1 |
54479
|
myrto.kouk
|
import { RouterModule, Routes } from '@angular/router';
|
2 |
|
|
import { NgModule } from '@angular/core';
|
3 |
58110
|
stefania.m
|
import { HomeComponent } from './pages/landing/home/home.component';
|
4 |
54479
|
myrto.kouk
|
import { AuthGuardService } from './services/auth-guard.service';
|
5 |
|
|
import { ForbiddenPageComponent } from './shared/reusablecomponents/403-forbidden-page.component';
|
6 |
58109
|
stefania.m
|
import { EmptyPageComponent } from "./pages/emptypage/empty-page.component";
|
7 |
|
|
import { JoinComponent } from "./pages/join/join.component";
|
8 |
58110
|
stefania.m
|
import { AboutComponent } from "./pages/landing/about/about.component";
|
9 |
54479
|
myrto.kouk
|
|
10 |
|
|
const appRoutes: Routes = [
|
11 |
|
|
{
|
12 |
|
|
path: '',
|
13 |
58110
|
stefania.m
|
redirectTo: '/home',
|
14 |
54479
|
myrto.kouk
|
pathMatch: 'full'
|
15 |
|
|
},
|
16 |
|
|
{
|
17 |
58110
|
stefania.m
|
path: 'home',
|
18 |
|
|
component: HomeComponent
|
19 |
54479
|
myrto.kouk
|
},
|
20 |
|
|
{
|
21 |
58110
|
stefania.m
|
path: 'about',
|
22 |
|
|
component: AboutComponent
|
23 |
|
|
},
|
24 |
|
|
{
|
25 |
58109
|
stefania.m
|
path: 'join',
|
26 |
|
|
component: JoinComponent,
|
27 |
|
|
canActivate: [AuthGuardService]
|
28 |
|
|
},
|
29 |
|
|
{
|
30 |
58098
|
stefania.m
|
path: 'emptyPage',
|
31 |
|
|
component: EmptyPageComponent,
|
32 |
54479
|
myrto.kouk
|
canActivate: [AuthGuardService]
|
33 |
|
|
},
|
34 |
|
|
{
|
35 |
58098
|
stefania.m
|
path: 'repository',
|
36 |
|
|
loadChildren: './pages/repository/repository.module#RepositoryModule',
|
37 |
|
|
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
38 |
|
|
canActivate: [AuthGuardService]
|
39 |
|
|
},
|
40 |
58108
|
stefania.m
|
{
|
41 |
|
|
path: 'repositoryAdmin',
|
42 |
|
|
loadChildren: './pages/repository/repository.module#RepositoryModule',
|
43 |
|
|
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
44 |
|
|
canActivate: [AuthGuardService]
|
45 |
|
|
},
|
46 |
58098
|
stefania.m
|
|
47 |
|
|
|
48 |
|
|
// {
|
49 |
|
|
// path: 'dashboard',
|
50 |
|
|
// component: DashboardComponent,
|
51 |
|
|
// canActivate: [AuthGuardService]
|
52 |
|
|
// },
|
53 |
|
|
{
|
54 |
54479
|
myrto.kouk
|
path: 'sources',
|
55 |
|
|
loadChildren: './pages/sources/sources.module#SourcesModule',
|
56 |
|
|
canActivate: [AuthGuardService]
|
57 |
|
|
},
|
58 |
|
|
{
|
59 |
|
|
path: 'compatibility',
|
60 |
|
|
loadChildren: './pages/compatibility/compatibility.module#CompatibilityModule'
|
61 |
|
|
},
|
62 |
|
|
{
|
63 |
|
|
path: 'content',
|
64 |
|
|
loadChildren: './pages/content/content.module#ContentModule',
|
65 |
|
|
canActivate: [AuthGuardService]
|
66 |
|
|
},
|
67 |
58098
|
stefania.m
|
// {
|
68 |
|
|
// path: 'getImpact',
|
69 |
|
|
// loadChildren: './pages/metrics/metrics.module#MetricsModule',
|
70 |
|
|
// canActivate: [AuthGuardService]
|
71 |
|
|
// },
|
72 |
54479
|
myrto.kouk
|
{
|
73 |
|
|
path: 'admin',
|
74 |
|
|
loadChildren: './pages/adminPg/adminPg.module#AdminPgModule',
|
75 |
|
|
},
|
76 |
|
|
{
|
77 |
|
|
path: '403-forbidden',
|
78 |
|
|
component: ForbiddenPageComponent
|
79 |
|
|
},
|
80 |
58098
|
stefania.m
|
// {
|
81 |
|
|
// path: '',
|
82 |
58110
|
stefania.m
|
// redirectTo: '/home',
|
83 |
58098
|
stefania.m
|
// pathMatch: 'full'
|
84 |
|
|
// },
|
85 |
54479
|
myrto.kouk
|
{
|
86 |
58098
|
stefania.m
|
//fixme redirect to 404
|
87 |
54479
|
myrto.kouk
|
path: '**',
|
88 |
58098
|
stefania.m
|
redirectTo: '/403-forbidden',
|
89 |
|
|
// component: ForbiddenPageComponent
|
90 |
54479
|
myrto.kouk
|
}
|
91 |
|
|
];
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
@NgModule ({
|
95 |
|
|
imports: [RouterModule.forRoot(appRoutes)],
|
96 |
|
|
exports: [RouterModule]
|
97 |
|
|
})
|
98 |
|
|
|
99 |
|
|
export class AppRoutingModule {}
|