F
F
Friend2016-10-22 12:28:23
Angular
Friend, 2016-10-22 12:28:23

How to trim an array inside ng-repeat?

angular.min.js:118 Error: [$rootScope:infdig] errors.angularjs.org/1.5.8/$rootScope/infdig? There is such an error, as far as I understand, I cut off the array through my own filter and now it goes beyond the boundaries. How can I specify how many elements of an array I want to display?

ng-repeat="door in doors | filtermaterials:si8825:si9525"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2016-10-22
@AMar4enko

Your error occurs because your filter changes the data, which causes the change check to be called again, which causes the filter to be called again and everything goes into infinite recursion. The filter is probably written incorrectly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question