I’m writing a custom sync for Backbone and the name url for the sync isn’t an obvious choice. I’d like to make it something like point so instead of:
MyAppModel = Backbone.Model.extend({
url: '/some/api'
});
I can use…
MyAppModel = Backbone.Model.extend({
point: 'some/reference`
});
Is there any way to (without modifying Backbone) make it so url = point?
This should work:
url = function(){return this.point };But why do you want to ‘rename’ the
urlproperty? Just for semantics?