-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpcsr.routing.module.ts
52 lines (40 loc) · 1.41 KB
/
pcsr.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { Routes, RouterModule, PreloadAllModules } from "@angular/router";
import { NgModule } from "@angular/core";
import { CanDeactivateGuard } from "app/gc_basic/can-deactivate.guard";
import { AuthGuard } from "app/gc_basic/auth.guard";
const routes: Routes = [
//businesses
{
path: "businesses/new",
loadChildren: () => import("./pages/edit-business/edit-business.module").then(m => m.EditBusinessPageModule),
canActivate: [AuthGuard]
},
{
path: "businesses",
loadChildren: () => import("./pages/businesses/businesses.module").then(m => m.BusinessesPageModule),
},
{
path: "businesses/:businessId",
loadChildren: () => import("./pages/business-detail/business-detail.module").then(m => m.BusinessDetailPageModule),
canActivate: [AuthGuard]
},
{
path: "businesses/:businessId/edit",
loadChildren: () => import("./pages/edit-business/edit-business.module").then(m => m.EditBusinessPageModule),
canActivate: [AuthGuard]
},
{
path: ":slug/sponsorships",
loadChildren: () => import(
"./pages/channel-sponsorships/channel-sponsorships.module").then(m => m.ChannelSponsorshipsPageModule),
},
];
@NgModule({
imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })],
exports: [RouterModule],
providers: [
CanDeactivateGuard,
]
})
export class PCSRRoutingModule {
}