Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created February 11, 2014 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeroeth/8942688 to your computer and use it in GitHub Desktop.
Save zeroeth/8942688 to your computer and use it in GitHub Desktop.
Make model available to Backbone.Marionette View.
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