javascript - Angular js Custom ng-repeat end directive not working with dynamically populating models -
i have ng-repeat in html page uses model gets populated dynamicaly via api call , .i wrote custom ng repeat end directive run functions everytime when model updated , rendered in browser,
app.directive('repeatend', function() { return function(scope, element, attrs) { if (scope.$last) settimeout(function(){ console.log("render completed"); }, 1); }; }) <li ng-if="comparelist.length >= 1" ng-repeat="el in comparelist track $index" repeat-end>//repeate content//</li> this works first time when comparelist model populated dynamically, when populated dynamic call, not work , works randomly . kindly me through issue
Comments
Post a Comment