Is there a similar property to urlRoot
for a collection?
My collection is currently set up as so:
Entities.Notifications = Entities.Collection.extend({
model: Entities.Notification,
url: '/notifications'
});
/notification
is appended to the domain name when fetching. How do I do something like:
Entities.Notifications = Entities.Collection.extend({
model: Entities.Notification,
url: 'https://www.differentdomain.com/notifications'
});
So it gets the data from a different source?
Based on the example from the docs, it looks like if you define URL as a function it shouldn't do the append, something like:
var Notes = Backbone.Collection.extend({
url: function() {
return 'https://www.differentdomain.com/notifications';
}
});