Having trouble with selecting a belongsTo association to it's parent via a select box on an input form.
Model in question
export default DS.Model.extend({
proNumber: DS.attr('number'),
status: DS.attr('string'),
special: DS.attr('string'),
customer: DS.belongsTo('customer', { async: true }),
carrier: DS.belongsTo('carrier', { async: true }),
equipmentList: DS.belongsTo('equipment-list', { async: true}),
stops: DS.hasMany('stop'),
loadRates: DS.hasMany('load-rate'),
grossPay: Ember.computed.mapBy('loadRates', 'rate'),
totalGrossPay: Ember.computed.sum('grossPay')
});
Model that I'm trying to associate is customer above.
input - from Material - works exactly like most selectbox Ember addons
{{md-select content=customerList
value=model.customer <-- doesn't work
label="Customer"
prompt="Please Choose a Customer..."
optionLabelPath='content.name'
optionValuePath='content.id'}}
The value doesn't work.
Aucun commentaire:
Enregistrer un commentaire