From 428f2b563663315df4f235ca19cef4bdcf82e2ab Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 30 Mar 2012 13:55:33 -0700 Subject: [PATCH] feat(ngInclude): allow ngInclude on css class And make it terminal so that it does not compile its content, which would cause leaks. --- src/ng/directive/ngInclude.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js index f615981362fa..6a656cb6de16 100644 --- a/src/ng/directive/ngInclude.js +++ b/src/ng/directive/ngInclude.js @@ -3,7 +3,7 @@ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ng-include - * @restrict EA + * @restrict ECA * * @description * Fetches, compiles and includes an external HTML fragment. @@ -74,7 +74,8 @@ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile', function($http, $templateCache, $anchorScroll, $compile) { return { - restrict: 'EA', + restrict: 'ECA', + terminal: true, compile: function(element, attr) { var srcExp = attr.ngInclude || attr.src, onloadExp = attr.onload || '',