Home » Backbone.js Collection.extend()

Backbone.js Collection.extend()

by Online Tutorials Library

Backbone.js Collection.extend()

The extend method is used to extend the backbone’s collection class to create your own collection. It provides instance properties and optional classProperties to be attached directly to the collection’s constructor function.

Syntax:


Parameter explanation:

properties: Properties provide instance properties for the collection class .

classProperties: Class properties are attached to the collection’s constructor function.

Let’s take an example.

See this example:

You may also like