-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathapp-routing.module.ts
More file actions
40 lines (38 loc) · 988 Bytes
/
app-routing.module.ts
File metadata and controls
40 lines (38 loc) · 988 Bytes
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
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CheckLoginGuard } from '@shared/guards/check-login.guard';
const routes: Routes = [
{
path: '',
loadChildren: () =>
import('./pages/home/home.module').then((m) => m.HomeModule),
},
{
path: 'home',
loadChildren: () =>
import('./pages/home/home.module').then((m) => m.HomeModule),
},
{
path: 'notFound',
loadChildren: () =>
import('./pages/not-found/not-found.module').then(
(m) => m.NotFoundModule
),
},
{
path: 'admin',
loadChildren: () =>
import('./pages/admin/admin.module').then((m) => m.AdminModule),
},
{
path: 'login',
loadChildren: () =>
import('./pages/auth/login/login.module').then((m) => m.LoginModule),
canActivate: [CheckLoginGuard],
},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}