mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
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:
parent
199ac26986
commit
428f2b5636
1 changed files with 3 additions and 2 deletions
|
|
@ -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 || '',
|
||||
|
|
|
|||
Loading…
Reference in a new issue