1
我有這樣的佈局視圖:呼叫'上木偶LayoutView區域show`
var appLayoutView = Backbone.Marionette.LayoutView.extend({
template: function() {
return "some template string";
},
regions: {
notify: "[data-region='Notify']"
},
onShow: function() {
this.regions.notify.show(new notifyView());
}
});
我稱之爲像這樣:
mainLayout.app.show(appLayout);
那麼理想,我想,當我運行上面(主要是當佈局視圖被放入DOM時)notifyView
被渲染到「通知」區域。但this.regions.notify
只是一個字符串。我怎樣才能達到我在這裏想要做的?基本上在Layout View類中具有「notify」的呈現邏輯,而不是從調用行進行控制。
Awhhhhh yisS基因!會放棄一下 – benhowdle89 2014-11-03 20:33:56