0
使用Ember.Select,我成功地使我的下拉菜单Ember.Select - 选择价值
{{view Ember.Select
content=businessType.acceptableValues
optionLabelPath="content.name"
optionValuePath="content.value"
prompt=businessType.prompt
}}
从模型中把数据控制器看起来像:
businessType: function(){
var content = this.get('content');
return content.get(10);
}.property('content')
我可以”弄清楚如何设置选定的值。我试图设置值content.value,我试过selectionBinding = content.value,但没有任何工作对我来说。我对此没有理解。
谢谢
了解。因此,如果我将该示例附加到currentProgrammer:{id:2}到我的控制器,然后在Ember.Select中添加value = currentProgrammer.id,我会认为它会起作用。但事实并非如此。这里有一个https://gist.github.com/bungdaddy/11361635 – Bungdaddy
你能用你的代码准备一个jsbin吗? –