BootDB

Code | Open Source | Web

How Emit a Event When Ng-repeat Is Completed AngularJS

Use a directive with ng-repeat which triggers a function when ng-repeat reaches to last element, directive code:

.directive('onFinishEmit', function($timeout) {
    return {
        restrict: 'A',       
        link: function(scope, element, attr) {
            if (scope.$last === true) {
                $timeout(function() {                        
                    scope.$emit(attr.onFinishEmit);
                });
            }
        }
    }
});

Usage:

<div ng-repeat="data in dataset" on-finish-emit="renderComplete">

</div>