I'm using Ember v 1.13.8
I have input helper:
{{input type="text" value=newData action="addNewItem"}}
and action handler:
actions: {
addNewItem: function(value) {
this.get('personList').pushObject({name: value});
this.set('newData', '');
}
}
As you can see in order to clear input I have variable in controller where I store temporary value. I made input
helper dependent on it and this approach works, but I wonder may be there is Ember way of doing this?
Aucun commentaire:
Enregistrer un commentaire