Skip to content

Instantly share code, notes, and snippets.

@phungnc
Created January 24, 2013 16:16
Show Gist options
  • Select an option

  • Save phungnc/4624181 to your computer and use it in GitHub Desktop.

Select an option

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
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