aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets.js
diff options
context:
space:
mode:
authorMisko Hevery2010-05-10 10:36:06 -0700
committerMisko Hevery2010-05-10 10:36:06 -0700
commitf5027cc375cf29d8a78679297d9f6bdca9567eb7 (patch)
treef415af2b615656562c1d1ac10fe9b4aab83b54c7 /src/widgets.js
parent4542716370ac52f385795f509436104a2a3501d2 (diff)
parent664f1c56876f00b885272c39f759641271eef1dc (diff)
downloadangular.js-f5027cc375cf29d8a78679297d9f6bdca9567eb7.tar.bz2
Merge branch 'master' of github.com:angular/angular.js
Diffstat (limited to 'src/widgets.js')
-rw-r--r--src/widgets.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/widgets.js b/src/widgets.js
index 1dadfe51..064b27fe 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();
- });
};
}
});