我的 HTML:
<template name="foo">
{{#each category}}
{{#if this.custom}}
{{> someTemplateName}}
{{else}}
{{> generic}}
{{/if}}
{{/each}}
</template
如何将一些值返回给“someTemplateName”,以便我可以根据#each 语句中的对象切换模板。
Template.foo.someTemplateName = function () {
return A_TEMPLATE_NAME
}
谢谢。