File tree 2 files changed +32
-1
lines changed
2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,6 @@ var ngTranscludeMinErr = minErr('ngTransclude');
162
162
var ngTranscludeDirective = [ '$compile' , function ( $compile ) {
163
163
return {
164
164
restrict : 'EAC' ,
165
- terminal : true ,
166
165
compile : function ngTranscludeCompile ( tElement ) {
167
166
168
167
// Remove and cache any original content to act as a fallback
Original file line number Diff line number Diff line change @@ -8582,6 +8582,38 @@ describe('$compile', function() {
8582
8582
} ) ;
8583
8583
8584
8584
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
+
8585
8617
it ( 'should not merge text elements from transcluded content' , function ( ) {
8586
8618
module ( function ( ) {
8587
8619
directive ( 'foo' , valueFn ( {
You can’t perform that action at this time.
0 commit comments