Handlebars precompiled templates returns undefined value
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a template file test_temp.handlebars. Its content is, <div>Hello {{name}}</div> I compiled the template in my command line using the command, handlebars test_temp.handlebars -f test_temp.js The content of the test_temp.js file is, (function() { var template = Handlebars.template, templates = Handlebars.templates =Handlebars.templates || {}; templates['test_temp'] = template({"compiler":[5,">=2.0.0"],"main":function(depth0,helpers,partials,data) { var helper, functionType="function", escapeExpression=this.escapeExpression; return "<div