【发布时间】:2022-12-10 13:47:57
【问题描述】:
我有这个部分:
_info.hbs
info
我的助手文件中有这个助手函数:
助手.js
module.exports = {
infoPartial: function(context, options) {
return '/absolute/path/to/_info.hbs';
}
};
我的模板是这样的:
{{> ('infoPartial') }}
当我调用我的模板时,我得到
"The partial /absolute/path/to/_info could not be found"
我不知道,为什么车把找不到部分。也许有人可以帮我解决这个问题。
【问题讨论】:
-
我认为您应该包括有关您正在使用的服务器端 Handlebars 视图引擎和框架的标签。
标签: node.js handlebars.js