![]() |
VOOZH | about |
The Backbone.js mixin Collection is function which is used to append attributes and function to base Backbone.Collection class. This function is used add generic function link Underscore Method.
Syntax:
Backbone.Collection.mixin( properties );
Properties: It accepts a single property as mentioned above and described below:
In the below examples, we will use the Backbone.js mixin Collection.
Example 1: In this example, we will append some attributes and initialize method which will print itself.
Output:
Example 2: In this example, we will add print method to the base class which will print given attribute of model in class.