app.directive('onFinishRender', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeout(function () {
myFunction();
});
}
}
}
});
<div class="file" ng-repeat="file in files" on-finish-render="ngRepeatFinished">
<file/>
</div>