diff --git a/src/ng/compile.js b/src/ng/compile.js index 7ae720f4..139801d8 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1336,7 +1336,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 cce526d1..ff44f100 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -4021,6 +4021,42 @@ describe('$compile', function() { }); + it('should not pass transclusion into a templateUrl directive', function() { + + module(function($compileProvider) { + + $compileProvider.directive('transFoo', valueFn({ + template: '