<script type="text/x-handlebars" data-template-name="item-view">
{{#with view.content.json}}
<tr>
<td>{{unbound artistName}}</td>
<td>{{unbound price}}</td>
<td>{{unbound primaryGenreName}}</td>
<td>{{unbound version}}</td>
</tr>
{{/with}}
</script>
<table>
<script type="text/x-handlebars">
{{view Em.CollectionView itemViewClass="App.ItemView" contentBinding="App.itemsController"}}
</script>
</table>
上述模板中的 HTML 表格标签是使用 ember-1.0.pre.js 去除的。有没有比这更合适的模式来输出有很多值的结果表?
Handlebars.js:嵌套模板去除“安全”HTML的帖子似乎与保留标签的主题相关,但 Ember 在此基础上添加了自己的抽象。