Created
March 10, 2012 11:29
-
-
Save j-5-s/2011195 to your computer and use it in GitHub Desktop.
Extending Backbone Methods
This file contains 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
myModel = Backbone.Model.extend({ | |
initialize: function(){ | |
}, | |
set: function(attributes, options) { | |
//do something with the attributes | |
Backbone.Model.prototype.set.call(this, attributes, options); | |
}, | |
get: function(key) { | |
//do something with the attribute | |
Backbone.Model.prototype.get.call(this, key); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment