$templateCache サービスを使用して、html をキャッシュに追加したいと考えています。Angular のドキュメントの例では、実行時に使用する場合のみを示しています。
var myApp = angular.module('myApp', []);
myApp.run(function($templateCache) {
$templateCache.put('templateId.html', 'This is the content of the template');
});
ただし、myApp 構成を介していくつかのテンプレートを追加しようとすると、インジェクター エラーが発生するようです。RUN ではない templateCache を使用する方法はありますか?
ありがとう