54e3099c56
- Controller lifetime is bound to route lifetime - View lifetime is bound to controller lifetime - Control lifetime is bound to view lifetime - Enhanced event dispatching - Enhanced responsiveness in some places - Views communicate user input to controllers via new event system
17 lines
435 B
JavaScript
17 lines
435 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('');
|
|
this._notFoundView = new NotFoundView(path);
|
|
}
|
|
};
|
|
|
|
module.exports = router => {
|
|
router.enter('*', (ctx, next) => {
|
|
ctx.controller = new NotFoundController(ctx.canonicalPath);
|
|
});
|
|
};
|