szurubooru/client/js/controllers/not_found_controller.js
rr- 1acceb941d client: refactor linking and routing
Print all links through new uri.js component
Refactor the router to use more predictable parsing
Fix linking to entities with weird names (that contain slashes, + etc.)
2017-01-21 00:13:35 +01:00

18 lines
481 B
JavaScript

'use strict';
const topNavigation = require('../models/top_navigation.js');
const NotFoundView = require('../views/not_found_view.js');
class NotFoundController {
constructor(path) {
topNavigation.activate('');
topNavigation.setTitle('Not found');
this._notFoundView = new NotFoundView(path);
}
};
module.exports = router => {
router.enter(null, (ctx, next) => {
ctx.controller = new NotFoundController(ctx.canonicalPath);
});
};