Skip to content

Instantly share code, notes, and snippets.

@vadimdemedes
Created September 13, 2013 08:27
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 vadimdemedes/6548062 to your computer and use it in GitHub Desktop.
Save vadimdemedes/6548062 to your computer and use it in GitHub Desktop.
var TeamMemberView = Chute.View.extend({
template: _.template('<li><%= full_name %></li>'),
container: 'ul'
});
var TeamView = Chute.CollectionView.extend({
template: _.template('<ul></ul>'),
itemView: TeamMemberView
});
var teamMembers = new Backbone.Collection([
{ full_name: 'John Appleseed' },
{ full_name: 'John Doe' }
]);
var teamList = new TeamView({ collection: teamMembers });
teamList.render();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment