我似乎無法從我的主應用程序文件訪問我的視圖。我是新來的骨幹和牽線木偶,我讀過這些文件,但無法找到爲什麼它不起作用。任何幫助或建議?Backbone.js&Marionette.js - 無法從主app.js文件訪問視圖
app.js
window.App = new Marionette.Application();
App.addRegions({
gameCriteria: "#game-criteria"
});
App.myRegion.show(myView);
});
myView.js
App.module("Views", function(Views, App, Backbone, Marionette, $, _) {
var GameCriteriaTab = Backbone.Marionette.ItemView.extend({
template: JST["game-criteria-tab"],
regions: {
rulesRegion: "#rules-region"
},
onShow: function() {
this.rulesRegion.show(RulesView);
}
});
});
它只是說我的觀點沒有定義 – conor909 2014-08-29 15:32:27
是的,那是因爲你沒有定義它 – 2014-08-29 18:21:45