Backbone.js Collections – Creating Collections

Backbone collections are usefull when we want to work with a group of models :

  • Use add method to add model to a collection
  • Use length method to get number of songs
  • Use at method return the model at the specified index
  • Use get method return the model specified by its ID or CID
  • We can remove a model from a collection by calling the remove method


1

Laisser un commentaire

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *