dimanche 15 mai 2016

ember input helper value as array

In an html form, you can string multiple fields together and see as an array. For example:

<input name="cars[]" value="" />
<input name="cars[]" value="" />
<input name="cars[]" value="" />

In Ember, the equivalent would be similar to:





So that one could do this:

var car0 = this.get('car0');

How would you be able to do this dynamically? so I can grab all the 'car' fields, I do not believe you can do value=car[0] ?




Aucun commentaire:

Enregistrer un commentaire