1
我使用RESTAdapter模型来填充Ember的select选项。使用RESTAdapter时,Ember的选择选项是错误的
contentBinding被映射到控制器中的一个属性,我使用this.set('myProperty',model.find(someQuery))。
model.find(someQuery)带有1个结果,但是model.find(someQuery)带有许多结果会产生奇怪的效果。结果中的最后一个对象显示的次数与结果的长度一样多。
{{视图Ember.Select contentBinding = “myProperty的” optionValuePath = “content.id” optionLabelPath = “content.name” selectionBinding = “selectedResult” 提示=”“}}
谢谢Mike。对于数组的所有对象,id是相同的(doh !!)。 – Jacob 2013-04-21 21:13:58