Backbone.JS Destroy()

The Backbone.JS Destroy() model destroys or removes a model from the server.


Model.Destroy (options) 

Parameters: options: This parameter is used to specify the options like id, name etc. for a model.



 Model Example  


create: {"msg1":"HELLO WORLD.","msg2":"Welcome."}
delete: {"msg1":"HELLO WORLD.","msg2":"Welcome.","id":100}

Explanation: In the above example, the properties of a model are created, saved and Destroyed.

Please follow and like us:
Content Protection by