AngularJS:未捕获的错误:[$ rootScope:infdig] 10 $摘要()达到迭代摘要、错误、迭代、AngularJS

2023-09-13 04:01:06 作者:丝雨如愁

我有一个嵌套的数组,我在页面上NG-重复。通过查看网页,我想要的一切显示在屏幕上呈现,但在控制台中我得到的错误:

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.

这里是一个小提琴的模型我的情况

推荐答案

所以,我终于解决了这个问题。最后我什么事做了添加一个名为递归助手我的项目库,并注入它作为一个依赖。

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!