Hi Erivan,

This is not a problem with the ngRepeat. Its part of how angular works. You 
can't do what you are doing
in this way.

the ngIf will gets evaluated on every digest cycle. If there is a change in 
the models data anywhere, that
will cause a new digest cycle. You can't predict the number of evaluation 
cycles from within your own code.

If you use a function in a conditional directive (ngIf/ngSwitch/ngShow/ a 
few others) it must be a function
with no side effects and it needs to return the same result for the same 
argument every time. 
This is also known as a pure function 
<https://www.google.nl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCMQFjAA&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPure_function&ei=EjJLVN74LMWxPMjrgMgO&usg=AFQjCNGQkhFHIa6M-bx6e_de9DDMHJaRZA&sig2=PYPFi-yT9Z3XPiaHj8H17A&bvm=bv.77880786,d.ZWU>
.

If you build a plunker 
<http://plnkr.co/edit/tpl:t6EYzpT3VpfMAGsJHKqZ?p=catalogue> arround your 
problem, I can help you at a bit more if you want.

Does this answer your question?

Regards
Sander.


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to