I'm checking out Backbone Marionette and it seems promising for my current project. However, when adding modules they seem to auto start, regardless of the startWithParent setting. Here's a piece of the code I'm having issues with (part of it is actually copied from the Marionette docs):
var app = new Backbone.Marionette.Application();
var fooModule = app.module('fooModule', {
startWithParent: false,
define: function(){
console.log('I should not auto start');
}
});
app.start();
I'm expecting "I should not auto start" not to appear in my console, but it does. To me it seems I should execute...
app.module('fooModule').start()
...before this message should appear.
I'm using Backbone.Marionette 1.0.2, Backbone 1.0 and Underscore 1.4.4.
Any clues as to why this is happening? Thanks for helping!
Note that module initializers are called when the module is started, the define function is there to allow for module definition, but its execution doesn't mean that the module is started.
I've made a fiddle to explain what I mean: http://jsfiddle.net/Axg27/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With