aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets.js
diff options
context:
space:
mode:
authorVojta Jina2012-02-19 12:59:10 -0800
committerVojta Jina2012-02-28 17:48:07 -0800
commit60743fc52aea9eabee58258a31f4ba465013cb4e (patch)
treef148f23deab430bb33f84925af9f2afee17ac075 /src/widgets.js
parent9486590e1be7282bb0e87586a35ca0bee6c64ee0 (diff)
downloadangular.js-60743fc52aea9eabee58258a31f4ba465013cb4e.tar.bz2
feat(ng:include) Fire $contentLoaded event
+ refactor unload to listen on this event -> we can use unload with ng:view as well Closes #743
Diffstat (limited to 'src/widgets.js')
-rw-r--r--src/widgets.js3
1 files changed, 1 insertions, 2 deletions
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 {