fix($compile): render nested transclusion at the root of a template

Closes #8914
Closes #8925
This commit is contained in:
Peter Bacon Darwin
2014-09-04 13:27:19 +01:00
parent 7e02fa07eb
commit 466320f691
2 changed files with 35 additions and 0 deletions

View File

@@ -847,6 +847,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
? JQLitePrototype.clone.call($compileNodes) // IMPORTANT!!!
: $compileNodes;
if ( $linkNode.length === 0 && parentBoundTranscludeFn ) {
$linkNode = parentBoundTranscludeFn(scope);
}
forEach(transcludeControllers, function(instance, name) {
$linkNode.data('$' + name + 'Controller', instance);
});