1acceb941d
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.)
18 lines
481 B
JavaScript
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);
|
|
});
|
|
};
|