Vote count:
0
I have the following content for my select options in my controller:
opts: [
{id: 1, code: 'TEST A', desc: 'DESC A', other: 'EXAMPLE A'},
{id: 2, code: 'TEST B', desc: 'DESC B', other: 'EXAMPLE B'},
{id: 3, code: 'TEST C', desc: 'DESC C', other: 'EXAMPLE C'}
],
v: 2,
And this is in my application.hbs
{{view Ember.Select
content=opts
optionValuePath='content.id',
optionLabelPath='content.code'
value=v}}
This renders the select element with TEST B as pre-selected.
Question
How do I get the whole object whenever I select a value from the list? I understand I can get the value through this.get('v') which returns the value of the select element. Is there a way to get the other properties in the selected object?
Please help.
asked 47 secs ago
Ember.js How to access the whole object selected from Ember.Select?
Aucun commentaire:
Enregistrer un commentaire