dimanche 27 décembre 2015

EmberJS checkbox set value

According to the ember documentation, I can do this:

{{input type="checkbox" name="fruits[]" checked=isAdmin}}

This works fine, however... my checkbox, although 'on or off' but consider the following:

[ ] Apples
[ ] Blueberries
[ ] Oranges

Let's say the 'value' for each one of those is the label... so if someone where to check all 3, it would pass this as an array:

["Apples","Blueberries","Oranges"]

However, this isn't what happens...I get:

["true","true","true"]




Aucun commentaire:

Enregistrer un commentaire