10
Backbone.js에서 하위 뷰를 렌더링하고 추가하는 방법
내 응용 프로그램에서 다소 깊을 수있는 중첩보기 설정이 있습니다. 하위 뷰를 초기화, 렌더링 및 추가하는 방법에는 여러 가지가 있지만 일반적인 관행이 무엇인지 궁금합니다. 내가 생각한 커플은 다음과 같습니다. initialize : function () { this.subView1 = new Subview({options}); this.subView2 = new Subview({options}); }, render : function () { this.$el.html(this.template()); this.subView1.setElement('.some-el').render(); this.subView2.setElement('.some-el').render(); …