【发布时间】:2013-09-06 00:24:58
【问题描述】:
我是 ember 的新手,正在尝试弄清楚如何在选择控件更改时呈现模板。
代码:
App.LocationTypeController = Ember.ArrayController.extend({
selectedLocationType: null,
locationTypeChanged: function() {
//Render template
}.observes('selectedLocationType')
});
{{view Ember.Select
contentBinding="model"
selectionBinding="selectedLocationType"
optionValuePath="content.id"
optionLabelPath="content.name"}}
当 locationType 更改时,控制器中会触发 locationTypeChanged 函数。 但是我如何从那里将一些内容渲染到 dom 中? (this.render()?)...
【问题讨论】:
标签: javascript jquery ember.js handlebars.js