mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
revert: "fix($compile): render nested transclusion at the root of a template"
This reverts commit 9d9cdfb575.
This commit was causing breakages because of its assumption that transcluded
content would be handled predictably, i.e. with ngTransclude, whereas many
use cases involve manipulating transcluded content in linking functions.
This commit is contained in:
@@ -4097,35 +4097,6 @@ describe('$compile', function() {
|
||||
});
|
||||
|
||||
|
||||
describe('collocated nested transcludes', function() {
|
||||
|
||||
beforeEach(module(function($compileProvider) {
|
||||
|
||||
$compileProvider.directive('inner', valueFn({
|
||||
transclude: true,
|
||||
template: '<div ng-transclude></div>'
|
||||
}));
|
||||
|
||||
$compileProvider.directive('outer', valueFn({
|
||||
transclude: true,
|
||||
template: '<a href="#"><div inner ng-transclude></div></a>'
|
||||
}));
|
||||
|
||||
}));
|
||||
|
||||
|
||||
// Issue #8914
|
||||
it('should render nested transclusion at the root of a template', inject(function($compile, $rootScope) {
|
||||
|
||||
element = $compile('<div><div outer>transcluded content</div></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