Monday, 15 February 2010

javascript - Array filter cause infinite $digest loop -


I have two collections of objects, one of them contains primitive values ​​objects, second with object value.

I have to render the collection in the HTML table with dynamic columns. I have created a filter for this, but it is a collection of articles with archive and is the reason for the collection of objects with an infinite $ digest loop (see console).

This is one

I understand that the problem is returning to a new object due to angular.copy every time. But why does it work for primitive value?

Any ideas how can I solve this problem?

The reason it works is that primitive JS has referred to the priorities based on value, references Instead of problem can be resolved with the Landshus (_ library) recall function. Description of the exact problem and solution using Memoize


No comments:

Post a Comment