From 60743fc52aea9eabee58258a31f4ba465013cb4e Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sun, 19 Feb 2012 12:59:10 -0800 Subject: feat(ng:include) Fire $contentLoaded event + refactor unload to listen on this event -> we can use unload with ng:view as well Closes #743 --- src/widgets.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/widgets.js') diff --git a/src/widgets.js b/src/widgets.js index 6d64730f..a32abb75 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -68,7 +68,6 @@ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile' compile: function(element, attr) { var srcExp = attr.src, scopeExp = attr.scope || '', - onloadExp = attr.onload || '', //workaround for jquery bug #7537 autoScrollExp = attr.autoscroll; if (!element[0]['ng:compiled']) { element[0]['ng:compiled'] = true; @@ -106,7 +105,7 @@ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile' if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) { $anchorScroll(); } - scope.$eval(onloadExp); + scope.$emit('$contentLoaded'); } }).error(clearContent); } else { -- cgit v1.2.3