Spaces:
Running
Running
import { Routes } from '@angular/router'; | |
import { authGuard } from './guards/auth.guard'; | |
export const routes: Routes = [ | |
{ | |
path: 'login', | |
loadComponent: () => import('./components/login/login.component').then(m => m.LoginComponent) | |
}, | |
{ | |
path: '', | |
loadComponent: () => import('./components/main/main.component').then(m => m.MainComponent), | |
canActivate: [authGuard], | |
children: [ | |
{ | |
path: 'user-info', | |
loadComponent: () => import('./components/user-info/user-info.component').then(m => m.UserInfoComponent) | |
}, | |
{ | |
path: 'environment', | |
loadComponent: () => import('./components/environment/environment.component').then(m => m.EnvironmentComponent) | |
}, | |
{ | |
path: 'apis', | |
loadComponent: () => import('./components/apis/apis.component').then(m => m.ApisComponent) | |
}, | |
{ | |
path: 'projects', | |
loadComponent: () => import('./components/projects/projects.component').then(m => m.ProjectsComponent) | |
}, | |
{ | |
path: 'test', | |
loadComponent: () => import('./components/test/test.component').then(m => m.TestComponent) | |
}, | |
{ | |
path: '', | |
redirectTo: 'projects', | |
pathMatch: 'full' | |
} | |
] | |
}, | |
{ | |
path: '**', | |
redirectTo: '' | |
} | |
]; |