Created
September 13, 2013 08:27
-
-
Save vadimdemedes/6548062 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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