0
當我使用此模型時,下拉列表中有空標籤。我將標籤路徑設置爲鍵入。我的服務器返回2個車型在JSON和我看到2下拉菜單項(空)Ember視圖下拉菜單下拉菜單中有空標籤
export default DS.Model.extend({
type: DS.attr('string')
});
{{view "select" prompt="Account type" content=model optionLabelPath="type" optionValuePath="id"}}
你沒有從模型返回的id屬性,你正在給optionsValuePath作爲'id' – Vaibhav 2015-03-02 09:48:32
@Vaibhav你不需要這個模型。 – SuperUberDuper 2015-03-02 09:56:39
服務器返回ID – SuperUberDuper 2015-03-02 09:57:36