For example, in app-view.js, I see some event bind:
events: {
'keypress #new-todo': 'createOnEnter',
'click #clear-completed': 'clearCompleted',
'click #toggle-all': 'toggleAllComplete'
},
but in my opinion, the routes in controller could replace event bind at all, like:
var TodoRouter = Backbone.Router.extend({
routes: {
'*filter': 'setFilter',
'todo/add': 'add',
'todo/edit/:id': 'edit',
'todo/delete/:id': 'delete'
},
add: function () {...},
edit: function () {...},
......
});
and just replace the button with link, and I think use routes make it more like a mvc app, just like ASP.NET MVC
Why it still use event bind?