이벤트 (예 : 메모 제출)가 발생한 후보기를 다시 렌더링하는 가장 좋은 방법은 무엇입니까? 아래 코드에서 방금 추가 한 메모를 표시하도록보기를 다시 렌더링하고 싶습니다. 다음보기 다시 렌더링
var NotesView = SectionBaseView.extend({
model: app.models.Note,
events: {
'submit': 'Notes'
},
Notes: function (e) {
e.preventDefault();
var details = new this.model($('form').serializeObject());
details.url = '/email/Notes';
details
.save()
.done(function() {
app.notifySuccess('Note added successfully.');
});
views['#Notes'].render();
}
});
노트보기는 document.ready 함수에서 초기화된다 :
views['#Notes'] = new NotesView({ el: '#Notes', template: app.templates.Notes });
내가보기 [ '# 노트']하여 시도 렌더링(). 하지만 이것은 작동하지 않는 것 같습니다.
렌더링의 기본 구현에 Docs
은 no-op입니다. 렌더링 기능은 어디에 있습니까? –