and i do this http://plnkr.co/edit/hpYkZzbAteskjJznJ1t3?p=preview
2014-10-25 14:52 GMT-03:00 Erivan junior <[email protected]>: > Thanks Sander, > i use the $index for know when i have to "restart" my function. > > more one time thank you! > > > 2014-10-25 2:20 GMT-03:00 Sander Elias <[email protected]>: > > 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 a topic in the >> Google Groups "AngularJS" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/angular/AF3GSlQt4EU/unsubscribe. >> To unsubscribe from this group and all its topics, 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. >> > > > > -- > *Atenciosamente,* > *Erivan Rodrigues Gonzaga Junior* > > -- *Atenciosamente,* *Erivan Rodrigues Gonzaga Junior* -- 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.
