ng-onload
Version:
ngOnload directive for allowing callbacks from Angulars Scope to be executed on elements onload event.
2 lines (1 loc) • 349 B
JavaScript
;!function(){var n=function(){return{restrict:"A",scope:{callback:"&ngOnload"},link:function(n,t,o){t.one("load",function(o){var c=t.length>0&&t[0].contentWindow?t[0].contentWindow.location:void 0;n.callback({contentLocation:c})})}}};n.$inject=[],n.directiveName="ngOnload",angular.module("ngOnload",[]).directive(n.directiveName,n)}();