first question here at SO :) I'm workin on a backbone project and the main example I rely on is TODOMVC by Addy Osmani, but there's something I cant figure out:
on the Todo app inside AppView
this.listenTo(app.Todos, 'add', this.addOne);
calls
addOne: function (todo) {
var view = new app.TodoView({ model: todo });
$('#todo-list').append(view.render().el);
}
when I try to do the same I get the collection as the todo param inside addOne.
so, how can I get the actual model that was added?