{{view Ember.Select class="form-control" id="PackCategory" content=Categories optionValuePath="content.categoryId" optionLabelPath="content.name" value=VendingAdminController.selectedPack.categoryId}}
以及如何将视图指定为目标?
谢谢
只需在控制器中创建一个函数,即观察{{select}}的value属性
onSelectedPackChange:function(){ //insert the code that needs to be excuted on change here }.observes('selectedPack.categoryId')
上面的代码应该放在你的VendingAdminController中.