Skip to content

Instantly share code, notes, and snippets.

@oroce
Created June 24, 2012 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oroce/2984166 to your computer and use it in GitHub Desktop.
Save oroce/2984166 to your computer and use it in GitHub Desktop.
backbone.js CustomModel with View
var customModel = new CustomModel();
var sampleView = new Backbone.View({
model: customModel
});
var CustomModel = Backbone.Model.extend({
fetch: function(){
this.trigger( "fetch", this );
return Backbone.Model.prototype.fetch.apply( this, arguments );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment