diff --git a/src/ng/compile.js b/src/ng/compile.js index a1ec901a..639b220b 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1319,7 +1319,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode, - templateAttrs, jqCollection, childTranscludeFn, preLinkFns, postLinkFns, { + templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, { controllerDirectives: controllerDirectives, newIsolateScopeDirective: newIsolateScopeDirective, templateDirective: templateDirective, diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index a42629f6..eed66baf 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -3797,6 +3797,42 @@ describe('$compile', function() { }); + it('should not pass transclusion into a templateUrl directive', function() { + + module(function($compileProvider) { + + $compileProvider.directive('transFoo', valueFn({ + template: '