Parameter | Details |
---|---|
properties | Instance properties. |
classProperties | Optional. Properties that exist and are shared with every collection instance of this type. |
models | Optional. The initial array of models (or objects). If this parameter is left out, the collection will be empty. |
options | Optional. Object which serves to configure the collection and is then passed to the initialize function. |
Collections are ordered sets of models. You can bind "change"
events to be notified when any model in the collection has been modified, listen for "add"
and "remove"
events, fetch
the collection from the server, and use a full suite of Underscore.js methods.
Any event that is triggered on a model in a collection will also be triggered on the collection directly, for convenience. This allows you to listen for changes to specific attributes in any model in a collection.