-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp-routing.module.ts
More file actions
78 lines (75 loc) · 2.25 KB
/
Copy pathapp-routing.module.ts
File metadata and controls
78 lines (75 loc) · 2.25 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { Routes } from '@angular/router';
import { Segment } from 'src/utils/bms.utils';
const landingRoute = () => `/landing`;
const graphRoute = () => `/graph`;
const mapRoute = () => `/map`;
const chargingRoute = () => `/charging`;
const bmsRoute = () => `/bms`;
const bmsSegmentViewRoute = (id: Segment) => `/bms/segment/${id + 1}`;
const cameraRoute = () => `/camera`;
const faultsRoute = () => `/faults`;
const faultsGraphRoute = () => `/faults/fault-graph`;
const commandsRoute = () => `/commands`;
const efusesRoute = () => `/efuses`;
export const appRoutes = {
landingRoute,
graphRoute,
mapRoute,
chargingRoute,
bmsRoute,
bmsSegmentViewRoute,
cameraRoute,
faultsRoute,
faultsGraphRoute,
commandsRoute,
efusesRoute
};
// Lazy-loaded routes: each page is split into its own chunk to reduce initial bundle size (#199).
export const routes: Routes = [
{
path: 'landing',
loadComponent: () => import('src/pages/landing-page/landing-page.component')
},
{
path: 'graph',
loadComponent: () => import('src/pages/graph-page/graph-page.component')
},
{ path: '', redirectTo: appRoutes.landingRoute(), pathMatch: 'full' },
{
path: 'map',
loadComponent: () => import('src/pages/map/map.component')
},
{
path: 'charging',
loadComponent: () => import('src/pages/charging-page/charging-page.component')
},
{
path: 'bms',
loadComponent: () => import('src/pages/bms-debug-page/bms-debug-page.component').then((m) => m.BmsDebugPageComponent)
},
{
path: 'bms/segment/:id',
loadComponent: () =>
import('src/pages/bms-debug-page/bms-segment-view/bms-segment-view.component').then((m) => m.BmsSegmentViewComponent)
},
{
path: 'faults',
loadComponent: () => import('src/pages/fault-page/fault-page.component')
},
{
path: 'faults/fault-graph',
loadComponent: () => import('src/pages/graph-page/graph-page.component')
},
{
path: 'camera',
loadComponent: () => import('src/pages/camera-page/camera-page.component').then((m) => m.CameraPageComponent)
},
{
path: 'commands',
loadComponent: () => import('src/pages/car-command-page/car-command.component')
},
{
path: 'efuses',
loadComponent: () => import('src/pages/efuses-page/efuses-page.component')
}
];