diff options
Diffstat (limited to 'client/js/controllers/help_controller.js')
| -rw-r--r-- | client/js/controllers/help_controller.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/js/controllers/help_controller.js b/client/js/controllers/help_controller.js index 86788f6..9ee980d 100644 --- a/client/js/controllers/help_controller.js +++ b/client/js/controllers/help_controller.js @@ -1,5 +1,6 @@ 'use strict'; +const page = require('page'); const topNavController = require('../controllers/top_nav_controller.js'); const HelpView = require('../views/help_view.js'); @@ -8,6 +9,13 @@ class HelpController { this.helpView = new HelpView(); } + registerRoutes() { + page('/help', () => { this.showHelpRoute(); }); + page( + '/help/:section', + (ctx, next) => { this.showHelpRoute(ctx.params.section); }); + } + showHelpRoute(section) { topNavController.activate('help'); this.helpView.render(section); |