다음은 코드 의 작동 jsfiddle 입니다.
컬렉션보기가 손상되었습니다. 다음은 작동 버전입니다.
//collection view
// Notice that it's a `Backbone.View` and not a `Backbone.Collection`
App.Views.Tasks = Backbone.View.extend({
tagName : 'ul',
initialize : function(){this.render();},
render : function(){
this.collection.each(function(t){
var v = new App.Views.Task({model : t});
this.$el.append(v.render().el);
}, this); // scope to the view using `this`
}
});
출처
https://stackoverflow.com/questions/22050347