diff options
Diffstat (limited to 'src/widgets.js')
| -rw-r--r-- | src/widgets.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/widgets.js b/src/widgets.js index 8a816934..2fade3e3 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -192,22 +192,21 @@ angularWidget('NG:INCLUDE', function(element){ function incrementChange(){ changeCounter++;} this.$watch(srcExp, incrementChange); this.$watch(scopeExp, incrementChange); + scope.$onEval(function(){ + if (childScope) childScope.$eval(); + }); this.$watch(function(){return changeCounter;}, function(){ var src = this.$eval(srcExp), useScope = this.$eval(scopeExp); if (src) { - scope.$browser.xhr('GET', src, function(code, response){ + scope.$xhr.cache('GET', src, function(code, response){ element.html(response); childScope = useScope || createScope(scope); compiler.compile(element)(element, childScope); childScope.$init(); - scope.$root.$eval(); }); } }); - scope.$onEval(function(){ - if (childScope) childScope.$eval(); - }); }; } }); |
