2014-01-23 55 views
0

我正在使用handlebar 1.3.0。我試圖用命令預編譯車把模板handlebar.js中的預編譯問題

handlebars aa.tpl -f aa.js 

我得到下面給出的輸出。在編譯後的.js文件中,源模板文件中沒有html標記。

(function() { 
    var template = Handlebars.template, 
    templates = Handlebars.templates = Handlebars.templates || {}; 
})();   

該工具是否存在問題?

回答

2

我們不得不提到的源文件中的命令行擴展

handlebars --extension=tpl aa.tpl -f aa.js