Skip to content

Instantly share code, notes, and snippets.

@hunt3r
Created June 13, 2013 15:43
Show Gist options
  • Save hunt3r/5774758 to your computer and use it in GitHub Desktop.
Save hunt3r/5774758 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.listenTo(this.collection, 'change', this.render);
_.bindAll(this, "render");
this.collection.fetch({
success: this.render
});
},
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