mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-21 01:57:06 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user