I need to update the style for a particular element after ng-repeat has finished changing the dom. Here is my challenge. The directive I have written to fire ng-repeat work's just fine when I am adding items to the model, it doesn't get called though when I remove an object from the item.
I have added a function that randomly pushes and pops data from the list. You will see that the pop doesn't trigger the ng-repeat directive call. Anyway to work around that?
var module = angular.module('testApp', [])
.directive('onFinishRender', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
scope.$evalAsync(attr.onFinishRender);
}
}
}
});