We have understood how to divide the application into subapplications; however, we still need to decide when and how we will tell the main application that we need to start a specific subapplication. To accomplish that, each module should be associated with a specific router that needs to be active from the beginning. This is different from modules that can be lazy loaded when a route matches. The creator of
Marionette.js solves this scenario perfectly with his
BBCloneMail example app that we mentioned before. For that purpose, he included a library called
routefilter.js. As with any other library, this library is installed by adding the path reference in our project.
Route filter can be found at https://github.com/boazsender/backbone.routefilter ...