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