can.Model.resource
{String}
Define a restful resource URL.
String
A string URL to a restful resource. If the resource
is specified as "resource" and the model's id is
"id", resource will implement can.Model's ajax methods as follows:
Setting the resource property will not overwrite other implemented
ajax methods, however will overwrite inherited ajax methods.
Use
For each of the names (create, update, destroy, findOne, and findAll) use the URL provided by the
resourceproperty. For example:Will create a can.Model that is identical to:
Inherited AJAX methods will be overwritten when using the
resourceproperty. For example, inheriting our Todo model:Will create a Todo model identical to: