File size: 1,355 Bytes
3b93905
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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: ''
  }
];