Created
January 24, 2013 16:16
-
-
Save phungnc/4624181 to your computer and use it in GitHub Desktop.
lets say i have a small app to store and manage contact details (an address book) i have multiple users that can login and they each have their own collection of contacts...
ref: http://stackoverflow.com/questions/7385629/backbone-js-complex-views-combining-multiple-models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var model = new Backbone.Model(); | |
| model.set({contacts: new ContactsModel(), users: new UsersModel()}); | |
| var view = new GridView({model: model}); | |
| var contacts = new ContactsModel(); | |
| var users = new UsersModel(); | |
| var view = new GridView({model: contacts, users: users}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment