ng-repeat causes Error: 10 $digest() iterations reached. Aborting!

6,802 views
Skip to first unread message

gerold...@gmail.com

unread,
Aug 30, 2012, 8:44:34 AM8/30/12
to ang...@googlegroups.com
Hi!

Please have a look on the this example: http://jsfiddle.net/MTzJF/2/

In Chrome and IE8 the "Error: 10 $digest() iterations reached. Aborting!" messages appears in the js console.

Is there a better solution to call a computed function for ng-repeat.

Best regards,
Gerold

Roy Choo

unread,
Aug 30, 2012, 11:40:30 AM8/30/12
to ang...@googlegroups.com, gerold...@gmail.com
hmm

is this ok?


Regards
Roy

Jeremy W

unread,
Feb 4, 2013, 12:22:27 AM2/4/13
to ang...@googlegroups.com
Hi Gerold, do you have any insight on how to correctly handle dynamic model properties so it isn't doing all these iterations?

Peter Bacon Darwin

unread,
Feb 4, 2013, 4:16:53 AM2/4/13
to ang...@googlegroups.com

The better solution is to watch the original array and create a new computed array only when the original array changes. You can then safely bind to the new array

Pete
...from my mobile.

--
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 angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

cyberflohr

unread,
Feb 4, 2013, 10:34:30 AM2/4/13
to ang...@googlegroups.com
Hi Gerold,

I had the same problem, and follwed the advices from Igor in this thread: https://github.com/angular/angular.js/issues/705

At the end, i removed the function call from the ng-repeat - it's the only way to stabilize the model.

-
wolf
Reply all
Reply to author
Forward
0 new messages