Skip to content

Instantly share code, notes, and snippets.

@mlynch
Created May 11, 2012 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlynch/2660870 to your computer and use it in GitHub Desktop.
Save mlynch/2660870 to your computer and use it in GitHub Desktop.
Backbone Model Instance
var a = new UserApp();
a.id = id;
a.fetch({
success: function(r) {
var name = r.get('name');
console.log('Loaded app:', name);
},
error: function(r) {
console.log('Unable to load app');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment