fixed architecture to dispatch events when routes and token changes

This commit is contained in:
Fran Jurmanović
2021-05-31 12:00:07 +02:00
parent 48df6fc7cf
commit e1ab0e51d6
10 changed files with 131 additions and 29 deletions

View File

@@ -27,11 +27,12 @@ class AppMainElement extends HTMLElement {
path: "/",
component: "home-page",
layout: "menu-layout",
middleware: this.middleAuth,
},
{
path: "/home",
component: "home-page",
layout: "menu-layout",
middleware: this.middleAuth,
},
{
path: "/register",
@@ -46,10 +47,16 @@ class AppMainElement extends HTMLElement {
{
path: "/unauthorized",
component: "login-page",
layout: "menu-layout",
},
{
path: "token-expired",
path: "/token-expired",
component: "login-page",
layout: "menu-layout",
},
{
path: "/logout",
component: "logout-page",
},
]);
this.routerService.init();