Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can you give an example of how to build a collection?



Can you give an example of how to build a collection?..

Answer / Chhatrpal Singh

To create a collection in Backbone.js, first define the model, then create a new instance of that model and add it to a new collection: var MyModel = Backbone.Model.extend({}); var myModelInstance = new MyModel({ name: 'John' }); var myCollection = new Backbone.Collection([myModelInstance]);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Backbone.js Interview Questions

Explain when you can use unbinding function in backbone.js ?

1 Answers  


What is collection in backbone.js?

1 Answers  


Describe backbone events?

1 Answers  


What is the purpose of backbone.js?

1 Answers  


Explain architecture of backbone?

1 Answers  


What is the function of tojson ?

1 Answers  


Explain how you can use backbone.js for multiple page web app ?

1 Answers  


Explain the architecture of backbone.js

1 Answers  


What is backbone.sync is used for ?

1 Answers  


What is a view in backbone.js?

1 Answers  


Why you use backbone.js, not other frameworks?

1 Answers  


How do you define view in backbone.js?

1 Answers  


Categories