Skip to main content

save()

sends an AJAX request to the server

save?: (data: any, mode: string) => Promise<any>;

Parameters:

  • data: object - mandatory, data to be sent to the server
  • mode: 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!");});