Created
February 11, 2014 19:48
-
-
Save zeroeth/8942688 to your computer and use it in GitHub Desktop.
Make model available to Backbone.Marionette 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
return Backbone.Marionette.ItemView.extend({ | |
// Pass model to view because template 'this' is not current view. | |
// based on: https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.view.md#basic-example | |
// | |
templateHelpers: function() { | |
return { model: this.model }; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment