mardi 29 mars 2016

ember 2 parameters in a action of a select menu

I'm trying to pass more than one argument in an ember action. The problem is that one of the arguments is value='target.value' and apparently Ember doesn't like to add a second one.

How can I pass these two parameters? value='target.value' works if I only need one argument.

I've tried to write it this way but category is undefined.

{{#each selectorsData as |selectorItem|}}
<select onchange={{ action selectorItem.action value='target.value' category='selectorItem.name' }}>

I've tried this way too, but Ember gives me an error

{{#each selectorsData as |selectorItem|}}
   <select onchange={{ action selectorItem.action value='target.value' selectorItem.name }}>

 Error: Parse error on line 4:
 ....value' selectorItem.name }}>




Aucun commentaire:

Enregistrer un commentaire