I want to call some jQuery function targeting div with table. That table is populated with ng-repeat.
When I call it on
$(document).r
If you simply want to execute some code at the end of the loop, here's a slightly simpler variation that doesn't require extra event handling:
thing {{thing}}
function Ctrl($scope) {
$scope.things = [
'A', 'B', 'C'
];
}
angular.module('myApp', [])
.directive('myPostRepeatDirective', function() {
return function(scope, element, attrs) {
if (scope.$last){
// iteration is complete, do whatever post-processing
// is necessary
element.parent().css('border', '1px solid black');
}
};
});
See a live demo.