I have a web-service that gives me back some JSON, if I make the request with an ID in the URL: http://mywebservice.com/api/user/<id>. In the example here on GitHub, the "URL" field is set statically, but is there a way to set it dynamically with a given ID? I tried overriding the url property in extendModel as well as in extendCollection but the console says TypeError: undefined is not a function (evaluating 'model.url()')
I have a web-service that gives me back some JSON, if I make the request with an ID in the URL:
http://mywebservice.com/api/user/<id>
. In the example here on GitHub, the"URL"
field is set statically, but is there a way to set it dynamically with a given ID? I tried overriding theurl
property inextendModel
as well as inextendCollection
but the console saysTypeError: undefined is not a function (evaluating 'model.url()')