Skip to content

Instantly share code, notes, and snippets.

@stevenpsmith
Created January 23, 2012 17:05
Show Gist options
  • Save stevenpsmith/1664275 to your computer and use it in GitHub Desktop.
Save stevenpsmith/1664275 to your computer and use it in GitHub Desktop.
exercise.ActivityDetailsView = Backbone.View.extend({
//since this template will render inside a div, we don't need to specify a tagname
initialize: function() {
this.template = _.template($('#activity-details-template').html());
},
render: function() {
var container = this.options.viewContainer,
activity = this.model,
renderedContent = this.template(this.model.toJSON());
container.html(renderedContent);
container.trigger('create');
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment