mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-10 22:44:01 +08:00
Revert "fix($compile): render nested transclusion at the root of a template"
This reverts commit 466320f691.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user