maodouio / meteor-lean-startup-camp

毛豆网Meteor精益创业孵化营
63 stars 23 forks source link

ionTab badgeNumber 属性如何支持使用变量? #43

Closed zhongboqing closed 9 years ago

zhongboqing commented 9 years ago

ionTab badgeNumber 属性如何支持使用变量?例如: {{#ionTabs class="tabs-positive tabs-icon-top"}} {{> ionTab title="News" badgeNumber=“{{newsCount}}” path="news" iconOff="ios-paper" iconOn="ios-paper"}} {{> ionTab title="Todos" badgeNumber=“{{todosCount}}” path="todos" iconOff="checkmark-circled" iconOn="checkmark-circled"}} {{> ionTab title="Profile" path="profile" iconOff="person" iconOn="person"}} {{/ionTabs}}

luckyyang commented 9 years ago

官方文档是不支持的。我搜了一下,也没找到相关的资料。

这有个类似的问题没有人回答:http://www.searchalleasy.com/questions/29185791/is-it-possible-to-pass-a-variable-helper-as-argument-when-inserting-a-template

luckyyang commented 9 years ago

UPDATE: 已解决。方法是使用 meteoric 生成的 html 代码替换 meteoric 的原始 helper 代码