1 |
54479
|
myrto.kouk
|
import { RouterModule, Routes } from '@angular/router';
|
2 |
|
|
import { NgModule } from '@angular/core';
|
3 |
|
|
import { LandingComponent } from './pages/landing/landing.component';
|
4 |
|
|
import { AuthGuardService } from './services/auth-guard.service';
|
5 |
|
|
import { DashboardComponent } from './pages/dashboard/dashboard.component';
|
6 |
|
|
import { ForbiddenPageComponent } from './shared/reusablecomponents/403-forbidden-page.component';
|
7 |
|
|
|
8 |
|
|
const appRoutes: Routes = [
|
9 |
|
|
{
|
10 |
|
|
path: '',
|
11 |
|
|
redirectTo: '/landing',
|
12 |
|
|
pathMatch: 'full'
|
13 |
|
|
},
|
14 |
|
|
{
|
15 |
|
|
path: 'landing',
|
16 |
|
|
component: LandingComponent
|
17 |
|
|
},
|
18 |
|
|
{
|
19 |
|
|
path: 'dashboard',
|
20 |
|
|
component: DashboardComponent,
|
21 |
|
|
canActivate: [AuthGuardService]
|
22 |
|
|
},
|
23 |
|
|
{
|
24 |
|
|
path: 'sources',
|
25 |
|
|
loadChildren: './pages/sources/sources.module#SourcesModule',
|
26 |
|
|
canActivate: [AuthGuardService]
|
27 |
|
|
},
|
28 |
|
|
{
|
29 |
|
|
path: 'compatibility',
|
30 |
|
|
loadChildren: './pages/compatibility/compatibility.module#CompatibilityModule'
|
31 |
|
|
},
|
32 |
|
|
{
|
33 |
|
|
path: 'content',
|
34 |
|
|
loadChildren: './pages/content/content.module#ContentModule',
|
35 |
|
|
canActivate: [AuthGuardService]
|
36 |
|
|
},
|
37 |
|
|
{
|
38 |
|
|
path: 'getImpact',
|
39 |
|
|
loadChildren: './pages/metrics/metrics.module#MetricsModule',
|
40 |
|
|
canActivate: [AuthGuardService]
|
41 |
|
|
},
|
42 |
|
|
{
|
43 |
|
|
path: 'admin',
|
44 |
|
|
loadChildren: './pages/adminPg/adminPg.module#AdminPgModule',
|
45 |
|
|
},
|
46 |
|
|
{
|
47 |
|
|
path: '403-forbidden',
|
48 |
|
|
component: ForbiddenPageComponent
|
49 |
|
|
},
|
50 |
|
|
{
|
51 |
|
|
path: '**',
|
52 |
|
|
redirectTo: '/landing'
|
53 |
|
|
}
|
54 |
|
|
];
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
@NgModule ({
|
58 |
|
|
imports: [RouterModule.forRoot(appRoutes)],
|
59 |
|
|
exports: [RouterModule]
|
60 |
|
|
})
|
61 |
|
|
|
62 |
|
|
export class AppRoutingModule {}
|