1 | import {Routes} from '@angular/router';
|
---|
2 | import {LoginComponent} from "./components/login/login.component";
|
---|
3 | import {TicketsPageComponent} from "./components/tickets-page/tickets-page.component";
|
---|
4 | import {TicketsBuyComponent} from "./components/tickets-buy/tickets-buy.component";
|
---|
5 | import {StartRouteInstanceComponent} from "./components/route-instances/start-route-instnace/start-route-instance.component";
|
---|
6 | import {RouteInstanceComponent} from "./components/route-instances/route-instance/route-instance.component";
|
---|
7 | import {StartCommuteComponent} from "./components/commutes/start-commute/start-commute.component";
|
---|
8 | import {CommuteComponent} from "./components/commutes/commute/commute.component";
|
---|
9 | import {StartCcontrolComponent} from "./components/controls/start-ccontrol/start-ccontrol.component";
|
---|
10 | import {ControlsComponent} from "./components/controls/controls/controls.component";
|
---|
11 | import {ControlComponent} from "./components/controls/control/control.component";
|
---|
12 | import {AdminPanelComponent} from "./components/admin/admin-panel/admin-panel.component";
|
---|
13 | import {RegisterComponent} from "./components/register/register.component";
|
---|
14 | import {authGuard} from "./guards/auth.guard";
|
---|
15 | import {authCanmatchGuard} from "./guards/auth-canmatch.guard";
|
---|
16 |
|
---|
17 | export const routes: Routes = [{
|
---|
18 | path: 'login',
|
---|
19 | component: LoginComponent
|
---|
20 | },
|
---|
21 | {
|
---|
22 | path: 'tickets',
|
---|
23 | component: TicketsPageComponent,
|
---|
24 | canActivate: [authGuard],
|
---|
25 | canMatch: [authCanmatchGuard]
|
---|
26 | },
|
---|
27 | {
|
---|
28 | path: 'tickets/buy',
|
---|
29 | component: TicketsBuyComponent,
|
---|
30 | },
|
---|
31 | {
|
---|
32 | path: 'route-instances/start',
|
---|
33 | component: StartRouteInstanceComponent,
|
---|
34 | canActivate: [authGuard],
|
---|
35 | canMatch: [authCanmatchGuard]
|
---|
36 | },
|
---|
37 | {
|
---|
38 | path: 'route-instances/:id',
|
---|
39 | component: RouteInstanceComponent
|
---|
40 | },
|
---|
41 | {
|
---|
42 | path: 'commutes/start',
|
---|
43 | component: StartCommuteComponent
|
---|
44 | },
|
---|
45 | {
|
---|
46 | path: 'commutes/:id',
|
---|
47 | component: CommuteComponent
|
---|
48 | },
|
---|
49 | {
|
---|
50 | path: 'controls/start',
|
---|
51 | component: StartCcontrolComponent
|
---|
52 | },
|
---|
53 | {
|
---|
54 | path: 'controls',
|
---|
55 | component: ControlsComponent
|
---|
56 | },
|
---|
57 | {
|
---|
58 | path: 'controls/:id',
|
---|
59 | component: ControlComponent
|
---|
60 | },
|
---|
61 | {
|
---|
62 | path: 'admin',
|
---|
63 | component: AdminPanelComponent
|
---|
64 | },
|
---|
65 | {
|
---|
66 | path: 'register',
|
---|
67 | component: RegisterComponent
|
---|
68 | }
|
---|
69 |
|
---|
70 | ];
|
---|