collection.reset
  • References/JavaScript/Backbone/Collection

resetcollection.reset([models], [options]) Adding and removing models one at a time is all well and good, but sometimes you have

2025-01-10 15:47:30
collection.fetch
  • References/JavaScript/Backbone/Collection

fetchcollection.fetch([options]) Fetch the default set of models for this collection from the server,

2025-01-10 15:47:30
collection.comparator
  • References/JavaScript/Backbone/Collection

comparatorcollection.comparator By default there is no comparator for a collection. If you define a comparator, it will be

2025-01-10 15:47:30
collection.length
  • References/JavaScript/Backbone/Collection

lengthcollection.length Like an array, a Collection maintains a length property, counting the number of models it contains

2025-01-10 15:47:30
Collection.extend
  • References/JavaScript/Backbone/Collection

extendBackbone.Collection.extend(properties, [classProperties]) To create a Collection class of your own, extend Backbone

2025-01-10 15:47:30
collection.contains
  • References/JavaScript/Backbone/Collection

contains (includes)

2025-01-10 15:47:30
collection.indexBy
  • References/JavaScript/Backbone/Collection

indexBy

2025-01-10 15:47:30
collection.sort
  • References/JavaScript/Backbone/Collection

sortcollection.sort([options]) Force a collection to re-sort itself. You don't need to call this under normal circumstances, as a

2025-01-10 15:47:30
collection.some
  • References/JavaScript/Backbone/Collection

some (any)

2025-01-10 15:47:30
collection.models
  • References/JavaScript/Backbone/Collection

modelscollection.models Raw access to the JavaScript array of models inside of the collection. Usually you'll want to use get

2025-01-10 15:47:30