Access target property of select box

hi guys

Can anyone guide me on how can i access the target properties value field in an select box onchange event?


<select onchange={{action 'yourFunction' value='target.value'}}>
  <option value=1>option 1</option>
  <option value=2>option 2</option>

Ember Twiddle: link

You can also set the option value as an Ember object:

<option value={{yourObject}}>some text</option>

to preselect an option you need to set “selected=true” on the option element:

<option selected=true>some text</option>

thanks :slight_smile: