我正在为包含多个嵌套资源的资源开发单页视图。使用以下模板,我可以获得要呈现的顶级属性或集合,但不能同时呈现:
h1= @name
ul
#decisions
class Happenator.Views.ShowHappening extends Backbone.Marionette.Layout
template: "happenings/show"
regions:
decisions: "#decisions"
initialize: ->
@decisionsView = new Happenator.Views.Decisions(collection: @model.get("decisions"))
# Uncomment to render @model.name, but lose the decisions
# @bindTo(@model, "change", @render)
onRender: ->
@decisions.show(@decisionsView)
是否有一种可接受的方式来绑定顶级布局以在数据更改/到达时重新渲染,或者是否所有动态内容都支持进入子区域?