Skip to content

Instantly share code, notes, and snippets.

@hunt3r
Created June 13, 2013 15:32
Show Gist options
  • Save hunt3r/5774661 to your computer and use it in GitHub Desktop.
Save hunt3r/5774661 to your computer and use it in GitHub Desktop.
app.views.ChallengesNav = Backbone.View.extend({
collection : new app.collections.Challenges(),
template : Handlebars.compile(app.templates.ChallengesNav),
initialize: function() {
this.collection.bind('change', this.render(), this);
},
render: function() {
$('#challenge-nav').html(this.template({challenges : this.collection.models}));
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment