I'm using ngRepeat directive to render a big data list and I'm using $timeout to execute a function after the ng-repeat if finished. It works well, but is it a proper way ?
I mean will it work for all the cases ?
You can try $last ($last = true if the repeated element is last in the iterator).
<div ng-repeat="item in data">
<span ng-if="$last === true" ng-init="doSomething()"></span>
</div>
Example: http://jsfiddle.net/by3qk8w5/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With