1
我想用燼來顯示找到的內容的動態列表。問題是,當我試圖把句柄放在html屬性中時,一切都打破了。Ember把手嵌入ID
RegApp.PatronsFound = Ember.CollectionView.create
tagName: 'table'
content: []
itemViewClass: Ember.View.extend
template: Ember.Handlebars.compile("<td><button onclick='alert({{content.id}})'>{{content.name}}</button>")
RegApp.PatronsFound.appendTo('body')
當餵了一塊內容與3的ID和姓名FOO,我希望生成這個網站:
<button onclick="alert(3)">FOO</button>
相反,我得到這樣的:
<button onclick="alert(<script id=" metamorph-4-start'="" type="text/x-placeholder">3<script id="metamorph-4-end" type="text/x-placeholder"></script>)'>FOO</button>