Slide 14
Slide 14 text
View
var AppView = Backbone.View.extend({
template: _.template( $('#tmp-article-list').html() ),
el: '.main',
initialize: function () {
this.collection = new Collection();
this.collection.fecth();
this.listenTo(this.collection, 'sync', this.render);
},
render: function() {
this.$('.list-group').html(this.template({
'collection' : this.collection
}));
}
});
return AppView;