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

This reverts commit 466320f691.
This commit is contained in:
Peter Bacon Darwin
2014-09-04 14:15:38 +01:00
parent 466320f691
commit e0cf7c5bf2
2 changed files with 0 additions and 35 deletions

View File

@@ -847,10 +847,6 @@ 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);
});

View File

@@ -4097,37 +4097,6 @@ describe('$compile', function() {
});
describe('collocated nested transcludes', function() {
beforeEach(module(function($compileProvider) {
$compileProvider.directive('inner', valueFn({
restrict: 'E',
transclude: true,
template: '<u ng-transclude></u>'
}));
$compileProvider.directive('outer', valueFn({
restrict: 'E',
transclude: true,
template: '<a href="#"><inner ng-transclude></inner></a>'
}));
}));
// Issue #8914
it('should render nested transclusion at the root of a template', inject(function($compile, $rootScope) {
element = $compile('<div><outer>transcluded content</outer></div>')($rootScope);
$rootScope.$digest();
expect(element.text()).toEqual('transcluded content');
}));
});
describe('nested transcludes', function() {
beforeEach(module(function($compileProvider) {