From cce31d4c93978a9b2ed3bddb5f16e22fa0d07f5b Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sun, 11 Mar 2012 22:36:29 -0700 Subject: chore(ng-include): update to work in ng-include|src mode --- src/directive/ngInclude.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/directive/ngInclude.js b/src/directive/ngInclude.js index 297de966..90fd0b40 100644 --- a/src/directive/ngInclude.js +++ b/src/directive/ngInclude.js @@ -13,7 +13,7 @@ * * @scope * - * @param {string} src angular expression evaluating to URL. If the source is a string constant, + * @param {string} ng-include|src angular expression evaluating to URL. If the source is a string constant, * make sure you wrap it in quotes, e.g. `src="'myPartialTemplate.html'"`. * @param {Scope=} [scope=new_child_scope] optional expression which evaluates to an * instance of angular.module.ng.$rootScope.Scope to set the HTML fragment to. @@ -78,7 +78,7 @@ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile' return { restrict: 'EA', compile: function(element, attr) { - var srcExp = attr.src, + var srcExp = attr.ngInclude || attr.src, scopeExp = attr.scope || '', onloadExp = attr.onload || '', autoScrollExp = attr.autoscroll; -- cgit v1.2.3