front/general: replace manual DI with require(...)

This commit is contained in:
rr-
2016-04-01 00:20:34 +02:00
parent 7e26fc87ce
commit 36ffa5b4e7
13 changed files with 112 additions and 153 deletions

View File

@ -1,15 +1,17 @@
'use strict';
const topNavController = require('../controllers/top_nav_controller.js');
const HelpView = require('../views/help_view.js');
class HelpController {
constructor(topNavigationController, helpView) {
this.topNavigationController = topNavigationController;
this.helpView = helpView;
constructor() {
this.helpView = new HelpView();
}
showHelpRoute(section) {
this.topNavigationController.activate('help');
topNavController.activate('help');
this.helpView.render(section);
}
}
module.exports = HelpController;
module.exports = new HelpController();