From 17ee0f031ac4a37bf9a1dc8c87ffac4bd164d1cc Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 19 Jan 2011 21:47:14 -0800 Subject: fix ng:include issue introduced by a5eb3ed1 --- src/widgets.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3