aboutsummaryrefslogtreecommitdiffstats
path: root/src/widgets.js
diff options
context:
space:
mode:
authorIgor Minar2011-01-19 21:47:14 -0800
committerIgor Minar2011-01-19 21:47:14 -0800
commit17ee0f031ac4a37bf9a1dc8c87ffac4bd164d1cc (patch)
treedb799a01074f9b389fc4c069189150381d075df6 /src/widgets.js
parent10646c9f6f62dd5130606d07ffe69770b3973f47 (diff)
downloadangular.js-17ee0f031ac4a37bf9a1dc8c87ffac4bd164d1cc.tar.bz2
fix ng:include issue introduced by a5eb3ed1
Diffstat (limited to 'src/widgets.js')
-rw-r--r--src/widgets.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets.js b/src/widgets.js
index 4585629a..1ab8a2c9 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -635,7 +635,12 @@ angularWidget('ng:include', function(element){
if (src) {
xhr('GET', src, function(code, response){
element.html(response);
- childScope = useScope || createScope(scope);
+ if (useScope) {
+ childScope = useScope;
+ } else {
+ childScope = createScope(scope);
+ scope.$onEval(childScope.$eval);
+ }
compiler.compile(element)(element, childScope);
childScope.$init();
scope.$eval(onloadExp);