Created
March 28, 2014 05:19
-
-
Save shanecp/9825911 to your computer and use it in GitHub Desktop.
BB: Backbone Pass options to the view
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
// Compatibility override - Backbone 1.1 got rid of the 'options' binding | |
// automatically to views in the constructor - we need to keep that. | |
// http://stackoverflow.com/questions/19325323/backbone-1-1-0-views-reading-options | |
Backbone.View = (function(View) { | |
return View.extend({ | |
constructor: function(options) { | |
this.options = options || {}; | |
View.apply(this, arguments); | |
} | |
}); | |
})(Backbone.View); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment