ng-cache-loader
Advanced tools
Comparing version 0.0.4 to 0.0.5
13
index.js
@@ -11,6 +11,7 @@ /* | ||
var stub = 'angular.module(["ng"])' + | ||
'.run(["$templateCache", function (c) {\n' + | ||
' c.put("$key", $val);' + | ||
'\n}]);'; | ||
var stub = 'var v$i=$val;\n' + | ||
'angular.module(["ng"])' + | ||
'.run(["$templateCache",function(c){' + | ||
'c.put("$key", v$i)' + | ||
'}]);'; | ||
@@ -65,3 +66,4 @@ module.exports = function (source) { | ||
key: getTemplateId.apply(this), | ||
val: resolveUrl(source) | ||
val: resolveUrl(source), | ||
i: result.length + 1 | ||
}); | ||
@@ -75,3 +77,4 @@ } | ||
}); | ||
result.push('module.exports=v'+result.length+';'); | ||
return result.join('\n'); | ||
}; |
{ | ||
"name": "ng-cache-loader", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Puts HTML partials in the Angular's $templateCache.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -60,3 +60,3 @@ # Angular Template loader for webpack | ||
<!-- markup outside script tags available as ng-include="'myPartial.html'" --> | ||
<div>...</div> | ||
<div ng-include="'myFirstTemplate'">...</div> | ||
@@ -63,0 +63,0 @@ <script type ="text/ng-template" id="mySecondTemplate"> |
10933
195