When I try to override the urlRoot attribute of a model and do a fetch on that model, the urlRoot actually returns the whole function as a string. Here is what the overridden urlRoot looks like:
urlRoot: function() {
return "test";
},
It returns the following:
http://localhost:8000/items/function%20()%20%7B%20%20%20%20%20%20return%20%22test%22;%20%20%20%20%7D
Also, where does the items portion of the URL come from?
URLRoot is expected to be a static string
defined either during construction or
during runtime
You can override the URl as a
functionif a logic lies in construction of the url.Example