O'Reilly logo

Getting Started with Backbone Marionette by Arturo Soto, Raymundo Armendariz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the route filter

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required