2017-08-11 35 views
0

我正在构建一个没有咕噜咕噜或glup的过程,并且想要ngtemplate,因为团队使用它,但无法找到它的独立包,但我愿意在新系统中创建一个只需要一个正确的方向。Ngtemplate出咕噜或glup

回答

1

你可以写一个简单的JS脚本,通过所有的目录遍历除node_modulesbower_components与.html扩展读取该文件,内容追加到文件templates.js 您templates.js可能看起来像这样

angular.module('templates').run(['$templateCache', 
    function($templateCache) { 
    $templateCache.put('filename1','filecontent1'); 
    $templateCache.put('filename2','filecontent2'); 
    }]); 
+0

如果有帮助,请接受答案 – user93

+0

让我试试这个并回复给你。 – ZergRush