save()
sends an AJAX request to the server
save?: (data: object, mode: string) => Promise<any>;
Parameters:
data: object
- mandatory, data to be sent to the servermode: string
- mandatory, a mode of the request ("delete", "update", "insert")
Returns:
A promise of the data object
Example
proxy.save({ a: "bad" }, "delete").then(function() {
console.log("'Bad' is deleted!");
});