aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.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/directives.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/directives.js')
-rw-r--r--src/directives.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/directives.js b/src/directives.js
index 2d42d3ef..c988bf7b 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -975,3 +975,15 @@ var styleDirective = valueFn({
restrict: 'E',
terminal: true
});
+
+
+var onloadDirective = valueFn({
+ restrict: 'AC',
+ link: function(scope, elm, attr) {
+ var onloadExp = attr.onload || ''; //workaround for jquery bug #7537)
+
+ scope.$on('$contentLoaded', function(event) {
+ scope.$eval(onloadExp);
+ });
+ }
+});