Skip to content

Instantly share code, notes, and snippets.

@majornorth
Created March 20, 2015 22:36
Show Gist options
  • Save majornorth/471d42fca3e22e5b4684 to your computer and use it in GitHub Desktop.
Save majornorth/471d42fca3e22e5b4684 to your computer and use it in GitHub Desktop.
var VenuesView = Backbone.View.extend({
tagName: "ul",
id: "venues",
initialize: function(options){
this.bus = options.bus;
},
render: function(){
var self = this;
this.model.each(function(venue){
var view = new VenueView({ model: venue, bus: self.bus });
self.$el.append(view.render().$el);
});
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment