Good day! However I have read on stackoverflow a lot of article but nothing found. I have a little question about ngRepeat I mean about its execution. I want to be notifeid when ngRepeat iterate has finished. How to define finish render ngRepeat and run callback? And don't propose me to use $timeout.
Asked
Active
Viewed 456 times
1
-
You could use a directive like in [this example](http://www.jomendez.com/2015/02/05/angularjs-ng-repeat-onfinishrender-directive/) $timeout is used with `0` delay just to force a digest cycle. – Lulylulu Apr 11 '16 at 15:50
1 Answers
1
This question seems close to this one : Angular JS callback after ng-repeat is completed dynamically where Shohel answered to use a $broadcast on a custom directive so you can catch an event on your controller. Hope it will helped you.

Nico_
- 1,388
- 17
- 31
-
In some task it will be fine, I mean if items push at the end of array. But if make a little bit extends? Delete/add items from array in the middle place. So if I remove item from middle place the $scope.$last will be false. Your answer doen't correct. And it is trigger first time when finished ngRepeat – Maksim Apr 11 '16 at 16:01
-
Yes you're right, sadly I can see anything but a timeout then. According to this answer : http://stackoverflow.com/a/12641788/3672560, it looks like there is no clean solution. – Nico_ Apr 11 '16 at 16:14