From fe2145016cb057c92f9f01b32c58b4d7259eb6ee Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 3 Oct 2013 16:24:24 -0700 Subject: fix($compile): don't terminate compilation for regular transclusion directives Previously we would stop the compilation for both regular and element transclusion directives which was wrong. Only element transclusion directives should be terminal. --- test/ng/compileSpec.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'test/ng/compileSpec.js') diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 1e66b49f..f164ca7a 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -2905,6 +2905,30 @@ describe('$compile', function() { expect(log).toEqual('pre(); post(unicorn!)'); }); }); + + + it('should terminate compilation only for element trasclusion', function() { + module(function() { + directive('elementTrans', function(log) { + return { + transclude: 'element', + priority: 50, + compile: log.fn('compile:elementTrans') + }; + }); + directive('regularTrans', function(log) { + return { + transclude: true, + priority: 50, + compile: log.fn('compile:regularTrans') + }; + }); + }); + inject(function(log, $compile, $rootScope) { + $compile('