Created
September 20, 2012 05:58
-
-
Save swallentin/3754192 to your computer and use it in GitHub Desktop.
Backbone.js Collection Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Todos = Backbone.Collection.extend({ | |
url: "/todos", | |
model: Todo, | |
parse: function(res) { | |
return res.response.todos; | |
}, | |
comparator: function (todo) { | |
return todo.get("priority"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment