Created
January 13, 2015 14:25
-
-
Save johnathan-sewell/44f81eb49637eb524f14 to your computer and use it in GitHub Desktop.
Backbone constructor for named objects when debugging
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
//replace initialize | |
initialize: function(attrs) { | |
//initialize here | |
}, | |
//with | |
constructor: function User(attrs) { | |
Backbone.Model.apply(this, arguments); | |
//initialize here | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment