feat(ngInclude): allow ngInclude on css class

And make it terminal so that it does not compile its content, which would cause leaks.
This commit is contained in:
Vojta Jina 2012-03-30 13:55:33 -07:00
parent 199ac26986
commit 428f2b5636

View file

@ -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 || '',