Reputation: 7653
I have method in model:
decrease: function(){
this.save({
count: this.get('count') - 1
});
}
Next, i call method in view for event:
'click [data-skills="minus"]': 'decrease'
And from this method, i call method from model: (#3)
decrease: function(){
this.model.decrease();
}
Is there some way to call model's method directly from events? Without step #3.
Upvotes: 1
Views: 67
Reputation: 74096
events: {
'click [data-skills="minus"]': function(){
this.model.decrease();
}
}
Upvotes: 2