In addOne(todo) I'm having trouble understanding what the parameter is being referenced from:
In the AppView:
initialize: function(){
Todos.bind('add', this.addOne, this); //So "this" keyword is being passed, which refers to AppView itself
//More code here
},
then in the addOne function,
addOne: function(todo) {
var view = new TodoView({model: todo});
this.$("#todo-list").append(view.render().el);
},
See annotated source here: http://backbonejs.org/docs/todos.html
So isn't AppView being passed into addOne(todo)? Shouldn't a model be passed into model: todo in addOne()?
Thanks