【发布时间】:2023-03-22 00:37:01
【问题描述】:
我想将新参数传递给模板,同时保留其原始数据上下文。
- 原始数据上下文:{message:"hello"}
{{> myTemplate withIcon=True}} - 数据上下文被 {withIcon:True} 覆盖
实际上我的解决方案是像这样包装数据。
<code>
{{> myTemplate originalData=this withIcon=True}}
</code>
有没有更好的解决方案?
【问题讨论】:
标签: meteor