O'Reilly logo
  • Pasha Craydon thinks this is interesting:

Books = (function (Backbone, Marionette) { 'use strict'; var App = new Marionette.Application(); App.on('initialize:after', function () { if (Backbone.history) { Backbone.history.start(); } }); App.startSubApp = function (appName, args) { var currentApp = App.module(appName); if (App.currentApp === currentApp) { return; } if (App.currentApp) { App.currentApp.stop(); } App.currentApp = currentApp; currentApp.start(args); }; return App; })(Backbone, Backbone.Marionette);

From

Cover of Getting Started with Backbone Marionette

Note

subapps inside a main app