Skip to content

Commit 8a05b74

Browse files
committed
fix(ngTransclude): remove terminal: true
This was introduced in commit 2adaff0, but made obsolete in 41f3269. Fixes angular#16411
1 parent ddbf197 commit 8a05b74

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/ng/directive/ngTransclude.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ var ngTranscludeMinErr = minErr('ngTransclude');
162162
var ngTranscludeDirective = ['$compile', function($compile) {
163163
return {
164164
restrict: 'EAC',
165-
terminal: true,
166165
compile: function ngTranscludeCompile(tElement) {
167166

168167
// Remove and cache any original content to act as a fallback

test/ng/compileSpec.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8582,6 +8582,38 @@ describe('$compile', function() {
85828582
});
85838583

85848584

8585+
it('should allow directives with lower priority than ngTransclude on the same element', function() {
8586+
module(function() {
8587+
directive('lower', function(log) {
8588+
return {
8589+
priority: -1,
8590+
link: {
8591+
pre: function() {
8592+
log('pre');
8593+
},
8594+
post: function() {
8595+
log('post');
8596+
}
8597+
}
8598+
};
8599+
});
8600+
directive('trans', function(log) {
8601+
return {
8602+
transclude: true,
8603+
template: '<div lower ng-transclude></div>'
8604+
};
8605+
});
8606+
});
8607+
inject(function(log, $rootScope, $compile) {
8608+
element = $compile('<div trans><span>transcluded content</span></div>')($rootScope);
8609+
$rootScope.$apply();
8610+
8611+
expect(element.text()).toEqual('transcluded content');
8612+
expect(log).toEqual('pre; post');
8613+
});
8614+
});
8615+
8616+
85858617
it('should not merge text elements from transcluded content', function() {
85868618
module(function() {
85878619
directive('foo', valueFn({

0 commit comments

Comments
 (0)