You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Route}from'@angular/router';import{initialDataResolver}from'app/app.resolvers';import{AuthGuard}from'app/core/auth/guards/auth.guard';import{NoAuthGuard}from'app/core/auth/guards/noAuth.guard';import{LayoutComponent}from'app/layout/layout.component';// @formatter:off/* eslint-disable max-len *//* eslint-disable @typescript-eslint/explicit-function-return-type */exportconstappRoutes: Route[]=[// Redirect empty path to '/dashboards'{path: '',pathMatch: 'full',redirectTo: 'dashboards'},// Redirect signed-in user to the '/example'//// After the user signs in, the sign-in page will redirect the user to the 'signed-in-redirect'// path. Below is another redirection for that path to redirect the user to the desired// location. This is a small convenience to keep all main routes together here on this file.{path: 'signed-in-redirect',pathMatch: 'full',redirectTo: 'dashboards'},// Auth routes for guests{path: '',canActivate: [NoAuthGuard],canActivateChild: [NoAuthGuard],component: LayoutComponent,data: {layout: 'empty',},children: [{path: 'confirmation-required',loadChildren: ()=>import('app/modules/auth/confirmation-required/confirmation-required.routes'),},{path: 'forgot-password',loadChildren: ()=>import('app/modules/auth/forgot-password/forgot-password.routes'),},{path: 'reset-password',loadChildren: ()=>import('app/modules/auth/reset-password/reset-password.routes'),},{path: 'sign-in',loadChildren: ()=>import('app/modules/auth/sign-in/sign-in.routes'),},{path: 'sign-up',loadChildren: ()=>import('app/modules/auth/sign-up/sign-up.routes'),},],},// Auth routes for authenticated users{path: '',canActivate: [AuthGuard],canActivateChild: [AuthGuard],component: LayoutComponent,data: {layout: 'empty',},children: [{path: 'sign-out',loadChildren: ()=>import('app/modules/auth/sign-out/sign-out.routes'),},{path: 'unlock-session',loadChildren: ()=>import('app/modules/auth/unlock-session/unlock-session.routes'),},],},// Landing routes{path: '',component: LayoutComponent,data: {layout: 'empty',},children: [{path: 'home',loadChildren: ()=>import('app/modules/landing/home/home.routes'),},],},{path: 'test',loadChildren: ()=>import('./modules/test/test.routes'),},// Admin routes{path: '',canActivate: [AuthGuard],canActivateChild: [AuthGuard],component: LayoutComponent,resolve: {initialData: initialDataResolver,},children: [{path: 'dashboards',loadChildren: ()=>import('app/modules/admin/dashboards/dashboards.routes'),},{path: 'persons',loadChildren: ()=>import('app/modules/admin/persons/person.routes'),},{path: 'report',loadChildren: ()=>import('app/modules/admin/example/example.routes'),},{path: 'companies',loadChildren: ()=>import('app/modules/admin/companies/companies.routes'),},{path: 'users',loadChildren: ()=>import('app/modules/admin/user/user.routes'),},],},];
เพิ่ม Menu ในไฟล์ app/mock-api/common/navigation/data.ts ดังนี้