1
|
import { RouterModule, Routes } from '@angular/router';
|
2
|
import { NgModule } from '@angular/core';
|
3
|
import { RepositoryComponent } from "./repository.component";
|
4
|
import { DashboardComponent } from "./dashboard/dashboard.component";
|
5
|
import { AuthGuardService } from "../../services/auth-guard.service";
|
6
|
import { SourcesUpdateRepoComponent } from "./update/sources-update-repo.component";
|
7
|
|
8
|
const repositoryRoutes: Routes = [
|
9
|
{
|
10
|
path: '',
|
11
|
// redirectTo: '/403-forbidden',
|
12
|
children: [
|
13
|
{
|
14
|
path: ':id',
|
15
|
component: RepositoryComponent,
|
16
|
children: [
|
17
|
{
|
18
|
path: '',
|
19
|
redirectTo: 'dashboard',
|
20
|
// pathMatch: 'full'
|
21
|
},
|
22
|
{
|
23
|
path: 'dashboard',
|
24
|
component: DashboardComponent
|
25
|
},
|
26
|
{
|
27
|
path: 'getImpact',
|
28
|
loadChildren: './metrics/metrics.module#MetricsModule',
|
29
|
canActivate: [AuthGuardService]
|
30
|
},
|
31
|
{
|
32
|
path: 'aggregationHistory',
|
33
|
loadChildren: './aggregationhistory/compatibility-monitor.module#AggregationHistoryModule',
|
34
|
canActivate: [AuthGuardService]
|
35
|
},
|
36
|
{
|
37
|
path: 'events',
|
38
|
loadChildren: './events/events.module#EventsModule',
|
39
|
canActivate: [AuthGuardService]
|
40
|
},
|
41
|
{
|
42
|
path: 'update',
|
43
|
component: SourcesUpdateRepoComponent,
|
44
|
canActivate: [AuthGuardService]
|
45
|
},
|
46
|
// {
|
47
|
// path: 'videos/:id',
|
48
|
// component: VideoLesson
|
49
|
// },
|
50
|
// {
|
51
|
// path: 'textlectures/:id',
|
52
|
// component: TextLesson
|
53
|
// },
|
54
|
// {
|
55
|
// path: 'quizzes/:id',
|
56
|
// component: QuizLesson
|
57
|
// },
|
58
|
// {
|
59
|
// path: 'interactivelessons/:id',
|
60
|
// component: InteractiveLesson
|
61
|
// }
|
62
|
]
|
63
|
},
|
64
|
{
|
65
|
path: '',
|
66
|
redirectTo: '/403-forbidden'
|
67
|
}
|
68
|
]
|
69
|
}
|
70
|
];
|
71
|
|
72
|
@NgModule ({
|
73
|
imports: [RouterModule.forChild(repositoryRoutes)],
|
74
|
exports: [RouterModule]
|
75
|
})
|
76
|
|
77
|
export class RepositoryRoutingModule {}
|