diff options
| author | Tobias Bosch | 2013-11-26 19:55:02 -0800 | 
|---|---|---|
| committer | Tobias Bosch | 2013-12-05 22:16:25 -0800 | 
| commit | b0972a2e75909e41dbac6e4413ada7df2d51df3a (patch) | |
| tree | daefd834b62abcbe3ff970e2942cca16f67c491d /src/ng/compile.js | |
| parent | 2dbb6f9a54eb5ff5847eed11c85ac4cf119eb41c (diff) | |
| download | angular.js-b0972a2e75909e41dbac6e4413ada7df2d51df3a.tar.bz2 | |
fix($compile): update cloned elements if the template arrives after the cloning
If an element has a directive whose content is loaded using `templateUrl`,
and the element is cloned using a linking function before the template arrives,
the clone needs to be updated as well.
This also updates `ngIf` and `ngRepeat` to keep the connection to the clone
of a tranclude function, so that they know about the changes a directive with
`templateUrl` does to the element in the future.
Fixes to #4930.
Diffstat (limited to 'src/ng/compile.js')
| -rw-r--r-- | src/ng/compile.js | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/ng/compile.js b/src/ng/compile.js index fd8a8729..7d0bb008 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -931,7 +931,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {                  createBoundTranscludeFn(scope, childTranscludeFn || transcludeFn)                );              } else { -              nodeLinkFn(childLinkFn, childScope, node, undefined, boundTranscludeFn); +              nodeLinkFn(childLinkFn, childScope, node, $rootElement, boundTranscludeFn);              }            } else if (childLinkFn) {              childLinkFn(scope, node.childNodes, undefined, boundTranscludeFn); | 
