问题标签 [grunt-html2js]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1627 浏览

angularjs - 使用 ng-include 和 $templateCache 找不到文件

我有一个指令,我试图根据注入指令的对象动态加载不同的部分

我正在使用grunt-html2js将所有要添加的 html 文件转换为$templateCache. 我已经验证了 html 文件已添加到 中$templateCache,但是当我加载页面时,很难仅找到函数.html中引用的文件template

这是任何时间问题吗?有没有更好的方法来使用模板功能?