What is the aim of specifying a model in a Backbone collection? It seems that the collection need its own url. Why do this:
Backbone.Collection.extend({
url: '/rest/product',
model: Model
});
Instead of:
Backbone.Collection.extend({
url: '/rest/product'
});
With a model like this:
var Model = Backbone.Model.extend({
url: function() {
return '/rest/product/' + this.id;
}
});
Is there a way to group url
declaration?