I need to send a callback when ng-repeat finishes, but my solutions don't work. In my last solution I used a directive to do it.
Markup:
<div class="results" ng-model="results"> <div class="empl-card" ng-repeat="empl in employees | filter: searchQuery" callback-on-end="alert('callback')"> ... </div> </div> directive:
app.directive("callbackOnEnd", function() { return { restrict: "A", link: function(scope, element, attrs) { if (scope.$last) { scope.$eval(attrs.callbackOnEnd); } } }; }); Where could I have made a mistake?