App router. It extends the standard Backbone.js router.

The router manages the watching of the address hash and routes to the correct handler. You need to add your routes with their callback using addRoutes method. To add your routes, you have to listen to the router:init event.


const Events = require('core/events');
Events.on('router:init', function(router) {
    var routes = [
            route: 'MyModule/my_custom_route',
            name: 'MyModule',
            callback: MyModule