【发布时间】:2013-11-19 12:42:49
【问题描述】:
是否可以将车把模板标签放在生成的html字符串中?
例如:
Ember.Handlebars.helper(...) {
return new Handlebars.SafeString("<button {{action go}}></button>");
}
我知道这行不通,但任何人都可以提出正确的方法吗? (如果存在)
其html源码为:
<button {{action go}}></button>
但它应该是这样的:
<button data-ember-action="x"></button>
其中 x 是某个整数
干杯。
【问题讨论】:
标签: javascript ember.js handlebars.js