0
如上所述here,子模块上的 - startWithParent = false
会导致sub-Moudle无法从应用程序启动。木偶 - “startWithParent = false”的原因是什么?
正如我所知,startWithParent = false
中的子Moudue之后,MyApp.start()
不应执行子模块initializer
。
但是当我尝试后续 -
MyApp = new Marionette.Application();
MyApp.module("SubModule", function() {
// prevent starting with parent
this.startWithParent = false;
// Logs
console.log("Sub Module Created !");
});
MyApp.start();
的Sub Module Created !
日志,意味着该子模块initializer
采取行动。
您能否为我澄清一下?