javascript - AngularJS: Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached - Stack Overflow

I have a nested array which I am ng-repeating on the page. By looking at the page, everything I want to

I have a nested array which I am ng-repeating on the page. By looking at the page, everything I want to show on the screen is rendered, however in the console I get the error:

Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!

I assumed that this error occurs due to the amount of nested array's I have because once I make the size of my nested array smaller, the error doesn't appear.

Here is a fiddle that models my situation

I have a nested array which I am ng-repeating on the page. By looking at the page, everything I want to show on the screen is rendered, however in the console I get the error:

Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!

I assumed that this error occurs due to the amount of nested array's I have because once I make the size of my nested array smaller, the error doesn't appear.

Here is a fiddle that models my situation

Share Improve this question asked Nov 3, 2014 at 21:53 AlvinJAlvinJ 2714 gold badges7 silver badges20 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2

So I finally solved the issue. What I ended up doing was adding a library called Recursion Helper to my project, and injected it as a dependency.

Here is a link to the original post. Thanks!

It is a known AngularJS issue. AngularJS itself prevents to many iterations to avoid infinite loops.

There is a possible workaround but it can harm other parts of your code:

$rootScopeProvider.digestTtl(15);

This changes the limit of the ten iterations to fifteen or whatever number you would like to.

http://jsfiddle/NP7P5/33/

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745511116a4630775.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信