【问题标题】:Meteor: How can I embed template tags within other template tags?Meteor:如何在其他模板标签中嵌入模板标签?
【发布时间】:2015-03-28 18:10:32
【问题描述】:

例如,我的 Meteor 模板中有一个输入字段:

{{> afQuickField name="mobile" options="auto" label="Your mobile number"}}

然后我开始构建一个国际化网站,这意味着我需要 i18n 标签文本。使用anti:i18n,您可以拥有这样的国际化文本:

{{i18n "signup.form.mobile"}}

现在,我怎样才能将这个 i18n-ed 文本放入之前的模板标签中?我想要类似的东西

{{> afQuickField name="mobile" options="auto" label=(i18n 'signup.form.mobile')}}

但显然这是错误的语法。

有什么想法吗?

【问题讨论】:

    标签: javascript meteor meteor-autoform


    【解决方案1】:

    也许 almogdesign 方法可以帮助您进一步...

    https://github.com/aldeed/meteor-autoform/issues/483

    【讨论】:

      猜你喜欢
      • 2010-09-20
      • 2011-08-28
      • 1970-01-01
      • 2014-03-20
      • 2022-11-25
      • 1970-01-01
      • 2011-02-09
      • 2014-11-19
      • 2019-12-01
      相关资源
      最近更新 更多