[IMP] router: basic implementation of navigation guards

This commit is contained in:
Géry Debongnie
2019-08-01 07:42:58 +02:00
parent d593131cc1
commit 0a276fbf1d
5 changed files with 194 additions and 65 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { QWeb } from "../../src/qweb/index";
export class TestRouter extends Router {
destroy() {
window.removeEventListener("popstate", this.checkAndUpdateRoute);
window.removeEventListener("popstate", (this as any)._listener);
delete QWeb.DIRECTIVE_NAMES.routecomponent;
QWeb.DIRECTIVES = QWeb.DIRECTIVES.filter(d => d.name !== "routecomponent");