0
私は角度の例のように角度templateCacheを使用しています。角度1.xのtemplateCacheは別のファイルからコンテンツを入れます
var myApp = angular.module('myApp', []);
myApp.run(function($templateCache) {
$templateCache.put('templateId.html', 'This is the content of the
template');
});
しかし、ローカルのHTMLファイルからコンテンツをロードしたいとします。私が見つけた唯一の解決策は、gruntでtemplateCacheを構築することです。これは、htmlファイルをロードし、内容をput
関数の2番目のパラメータに入れます。
これが唯一の方法ですか?