I just get into backbone.js and I thought the best way to get into it is to actually create a todo list (yes ... pretty original). Regarding humor, I searched google and docs and stackoverflow, of course, in order to add an attribute to the collection. So, in my case, the todo list is a collection of lists. However, the Todo list may have a title, as in my design, I want to be able to create multiple lists.
var TodoList = Backbone.Collection.extend({ model: ListItem }); //is this possible for collections? var newTodoList = new TodoList({name: "My first list"});
Many thanks for the help! Appreciate it!
source share