diff options
| author | Igor Minar | 2013-10-25 19:10:50 -0700 | 
|---|---|---|
| committer | Igor Minar | 2013-10-28 01:11:18 -0700 | 
| commit | 18ae985c3a3147b589c22f6ec21bacad2f578e2b (patch) | |
| tree | 8411112a847a2f8de2b6a49a87814f50840385eb /src/ng/compile.js | |
| parent | 797c99eabee98fedcf01cdad4432569a9ebe8a17 (diff) | |
| download | angular.js-18ae985c3a3147b589c22f6ec21bacad2f578e2b.tar.bz2 | |
fix($compile): don't instantiate controllers twice for element transclude directives
This is a fix for regression introduced last week by faf5b980.
Closes #4654
Diffstat (limited to 'src/ng/compile.js')
| -rw-r--r-- | src/ng/compile.js | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/src/ng/compile.js b/src/ng/compile.js index 84432647..7754a8e6 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1191,9 +1191,13 @@ function $CompileProvider($provide) {              childTranscludeFn = compile($template, transcludeFn, terminalPriority,                                          replaceDirective && replaceDirective.name, { -                                          controllerDirectives: controllerDirectives, -                                          newIsolateScopeDirective: newIsolateScopeDirective, -                                          templateDirective: templateDirective, +                                          // Don't pass in: +                                          // - controllerDirectives - otherwise we'll create duplicates controllers +                                          // - newIsolateScopeDirective or templateDirective - combining templates with +                                          //   element transclusion doesn't make sense. +                                          // +                                          // We need only transcludeDirective so that we prevent putting transclusion +                                          // on the same element more than once.                                            transcludeDirective: transcludeDirective                                          });            } else { | 
