client/routing: move routing to controllers

This commit is contained in:
rr-
2016-04-06 21:49:26 +02:00
parent 55cc7b59e4
commit 5f29fa12c2
13 changed files with 92 additions and 62 deletions

View File

@ -1,8 +1,13 @@
'use strict';
const page = require('page');
const topNavController = require('../controllers/top_nav_controller.js');
class CommentsController {
registerRoutes() {
page('/comments', (ctx, next) => { this.listCommentsRoute(); });
}
listCommentsRoute() {
topNavController.activate('comments');
}