I\'ve been using Backbone for a total of 3 days now, and I can see that this has been asked about quite a lot, but honestly I\'m just not getting it. I\'ve been banging my head
You should use the parse() method in your collection :
Contact.Collections.Employees = Backbone.Collection.extend({
model: Contact.Models.Employee,
url: "includes/test-data.json",
initialize: function(){
console.log("Employees initialize");
},
parse : function(response){
return response.employees;
}
});
There is one parse() in the MOdel as well as in the Collection, for the same purpose on url() handling.
EDIT : I'm not an expert in the Router, but I suppose you have to render the View at some point.
var view = new Contact.Views.Employees({ collection: Contact.employees });
view.render();