1
이 뷰를 컬렉션 변경 이벤트에 바인딩하여 새 아이템이 컬렉션에 추가 될 때 리셋되도록하려면 어떻게해야합니까?컬렉션 변경시이 백본보기를 어떻게 재설정 할 수 있습니까?
KAC.Views.ModuleMainNavigation = Backbone.View.extend(
{
tagName: "div",
id: "",
className: "",
template: JST['modules/main_navigation'],
initialize: function() {
_.bindAll(this);
},
events: {
},
render: function() {
this.$el.html(
this.template(
{
collection : this.collection
}
)
);
return this;
}
}
);