Somethins超出范围或未注册。在我的项目中,添加了新文件helpers / strlib.js:
Handlebars.registerHelper('trimString', function(pStr, pStart, pEnd) {
var theString = pStr.substring(pStart,pEnd);
return new Handlebars.SafeString(theString)
});
在添加的视图中:
<div class="textCircle">{{trimString user.name 0 1}}</div>
错误:缺少帮助程序:“ trimString”