Backbone.Model class is used to extend application-specific domain methods and logic, which provide functionality to manage changes to data, and the ability to send CRUD (GET/PUT/POST/DELETE) operations on the server and dispatch many useful events.
For more information on
Backbone.Model, visit http://goo.gl/f9Wj2l.
To bind to the model events, use the
model.on('name', callback) function, which will trigger the callback when that event is invoked.
To create a new model, use the
backbone:model subgenerator, open the terminal, and execute the following command to create a new post model:
$ yo backbone:model post
This command will create a new file named
post.coffee located in the
app/scripts/models directory; ...