Get ng-repeat complete in angular directive
In the code below, how does the angular directive 'myscroll' know what ng-repeat elements are being created? <myscroll> <div ng-repeat="a in arr">{{a}}</div> </myscroll> I know that the $last event is not fired to the parent directive, how can I solve this? myapp.directive("myscroll", function () { return{ restrict: "E", transclude: true, template: "<span class='left'></span><div class='mask' ng-transclude></div><span class='right'></span>", link: function (scope, element, attr) { scope.$watch("$last",function(){ console.log("ng-repeat rendered") }) } } }) A simple way to do it is to create a