Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

ng-repeat get corrupted when iterating over a null #1015

Closed
trinarytree opened this issue May 8, 2014 · 1 comment · Fixed by #1017
Closed

ng-repeat get corrupted when iterating over a null #1015

trinarytree opened this issue May 8, 2014 · 1 comment · Fixed by #1017

Comments

@trinarytree
Copy link

to reproduce:
put this into a controller

dart code

@NgController(
    selector: '[foo-controller]',
    publishAs: 'ctrl')
class FooController {
  var foos = [1, 2];
  void clickFoo() {
    foos = foos == null ? [1, 2] : null;
  }
}

template code

<div foo-controller>
    <button ng-click="ctrl.clickFoo()">click me</button>
    {{ctrl.foos}}
    <div ng-repeat="foo in ctrl.foos">
      i'm a foo
    </div>
</div>

when you click on "click me" repeatedly, it will make the list shown on the page grow by 2 every other time.

@chirayuk
Copy link
Contributor

chirayuk commented May 8, 2014

I'll take this one.

chirayuk added a commit to chirayuk/angular.dart that referenced this issue May 8, 2014
This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it.  This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes dart-archive#1015
chirayuk added a commit to chirayuk/angular.dart that referenced this issue May 8, 2014
This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it.  This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes dart-archive#1015
vicb added a commit to vicb/angular.dart that referenced this issue May 8, 2014
vicb added a commit to vicb/angular.dart that referenced this issue May 8, 2014
jbdeboer pushed a commit to jbdeboer/angular.dart that referenced this issue May 13, 2014
This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it.  This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes dart-archive#1015
mvuksano pushed a commit to mvuksano/angular.dart that referenced this issue May 20, 2014
mvuksano pushed a commit to mvuksano/angular.dart that referenced this issue May 20, 2014
mvuksano pushed a commit to mvuksano/angular.dart that referenced this issue May 20, 2014
vicb added a commit to vicb/angular.dart that referenced this issue May 29, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Jun 4, 2014
jbdeboer added a commit to jbdeboer/angular.dart that referenced this issue Jul 12, 2014
This reverts commit f6187ae.

This is only reverted because it is not yet in g3v1x.
jbdeboer added a commit to jbdeboer/angular.dart that referenced this issue Jul 12, 2014
dsalsbury pushed a commit to dsalsbury/angular.dart that referenced this issue Jul 16, 2014
This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it.  This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes dart-archive#1015
dsalsbury pushed a commit to dsalsbury/angular.dart that referenced this issue Jul 16, 2014
dsalsbury pushed a commit to dsalsbury/angular.dart that referenced this issue Jul 16, 2014
This reverts commit f6187ae.

This is only reverted because it is not yet in g3v1x.
dsalsbury pushed a commit to dsalsbury/angular.dart that referenced this issue Jul 16, 2014
This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it.  This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes dart-archive#1015
dsalsbury pushed a commit to dsalsbury/angular.dart that referenced this issue Jul 16, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Aug 26, 2014
This re-introduce the PR dart-archive#1018: "refactor(ng-repeat): refactor fix for
dart-archive#1015" which had been reverted.
vicb added a commit that referenced this issue Aug 26, 2014
This re-introduce the PR #1018: "refactor(ng-repeat): refactor fix for
#1015" which had been reverted.
vicb added a commit that referenced this issue Aug 26, 2014
This re-introduce the PR #1018: "refactor(ng-repeat): refactor fix for
#1015" which had been reverted.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants