0
我正在使用Backbone.Marionette並需要呈現員工及其各自部門的視圖。我希望它看起來像這樣:如何使用Backbone Marionette呈現視圖
Department 1
***
Employee1
Employee2
Employee3
Department 2
***
Employee4
Employee5
Employee6
Employee7
Employee8
Department 3
***
Employee9
Employee10
我的收藏是這樣的:
Employee1/Department1
Employee2/Department1
Employee3/Department1
Employee4/Department2
Employee5/Department2
etc.
隨着department
變化,我需要渲染department
標題。
我將使用哪種視圖類型的組合。 Collection view
,Composite view
。我需要將邏輯放在視圖/模板中嗎?
謝謝Derick,'CompositeView'的'CollectionView'聽起來很完美。 –