Skip to content

Instantly share code, notes, and snippets.

@kwbock
Created April 25, 2013 17:16
Show Gist options
  • Select an option

  • Save kwbock/5461444 to your computer and use it in GitHub Desktop.

Select an option

Save kwbock/5461444 to your computer and use it in GitHub Desktop.
var ResourcesView = App.Views.ResourcesView = Backbone.Marionette.CompositeView.extend({
template: 'users_resources_collection',
tagName: 'div',
itemView: App.Views.ResourceItemView,
initialize: function (options) {
console.log(this);
this.extraContext = options.extraContext || {};
console.log(this);
},
appendHtml: function (collectionView, itemView) {
collectionView.$('tbody.user_resources').append(itemView.el);
},
templateHelpers: function () {
console.log(templateHelpers);
return this.extraContext;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment