-
Notifications
You must be signed in to change notification settings - Fork 1
/
app-routing.module.ts
38 lines (35 loc) · 1023 Bytes
/
app-routing.module.ts
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
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { AuthGuard } from './auth.guard';
import { RegionGuard } from './region.guard';
import { SelectRegionComponent } from './select-region/select-region.component';
import { LoginComponent } from './auth/login.component';
import { AuthGuardComponent } from './auth/auth-guard.component';
const routes: Routes = [
{
path: '',
canActivate: [ RegionGuard ],
children: [
{
path: '',
component: AuthGuardComponent,
canActivate: [ AuthGuard ],
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
},{
path: 'login',
component: LoginComponent
}
]
}, {
path: 'select-region',
component: SelectRegionComponent
}
];
@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }),
],
exports: [ RouterModule ]
})
export class AppRoutingModule {
}