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

Extra watch that should not happen #1124

Open
vicb opened this issue Jun 8, 2014 · 1 comment
Open

Extra watch that should not happen #1124

vicb opened this issue Jun 8, 2014 · 1 comment

Comments

@vicb
Copy link
Contributor

vicb commented Jun 8, 2014

In the following code (from #1089):

<div ng-if="ctrl.isList">
  <div ng-repeat="item in ctrl.data">{{item}}</div>
</div>
<div ng-if="!ctrl.isList">
  <div>{{ctrl.data}}</div>
</div>

ng-repeat is evaluated when ctrl.isList becomes false. It shouldn't.

Could this be linked with #1113 ?

/cc @yjbanov

@vicb vicb changed the title Extra watch that should not happend Extra watch that should not happen Jun 8, 2014
@jbdeboer
Copy link
Contributor

jbdeboer commented Jun 8, 2014

I believe so, yes it is linked.

In the meantime we are recommending ng-repeat="item in ctrl.isList ? ctrl.data : []". Horrible hack, fixing #1113 is a top priority.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants