From 3fe4491a6bf57ddeb312b8a30cf1706f6f1d2355 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 7 Nov 2013 00:24:07 -0800 Subject: fix($compile): correct isolate scope distribution to controllers Fixes an issue when we didn't share the isolate scope with the controller of the directive from the isolate directive's template when this directive was replaced onto the isolate directive element. --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ng/compile.js') diff --git a/src/ng/compile.js b/src/ng/compile.js index 42b37a2d..5fefdaaa 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1440,7 +1440,7 @@ function $CompileProvider($provide) { if (controllerDirectives) { forEach(controllerDirectives, function(directive) { var locals = { - $scope: directive === newIsolateScopeDirective ? isolateScope : scope, + $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope, $element: $element, $attrs: attrs, $transclude: boundTranscludeFn -- cgit v1.2.3