Pages.List = Backbone.View.extend({
initialize: function(options) {
this.pages = options.pages;
this.pages.on('reset', this.render, this);
},
render: function() {
console.log('render list');
this.$el.html(this.pages.map(function(page) {
return '' + page.get('title') + '';
}).join('
'));
return this;
}
});