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
|
|
9
|
const appRoutes: Routes = [
|
10
|
{
|
11
|
path: '',
|
12
|
redirectTo: '/landing',
|
13
|
pathMatch: 'full'
|
14
|
},
|
15
|
{
|
16
|
path: 'landing',
|
17
|
component: LandingComponent
|
18
|
},
|
19
|
{
|
20
|
path: 'dashboard',
|
21
|
component: DashboardComponent,
|
22
|
canActivate: [AuthGuardService]
|
23
|
},
|
24
|
{
|
25
|
path: 'sources',
|
26
|
loadChildren: './pages/sources/sources.module#SourcesModule',
|
27
|
canActivate: [AuthGuardService]
|
28
|
},
|
29
|
{
|
30
|
path: 'compatibility',
|
31
|
loadChildren: './pages/compatibility/compatibility.module#CompatibilityModule',
|
32
|
canActivate: [AuthGuardService]
|
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
|
},
|
49
|
{
|
50
|
path: '**',
|
51
|
redirectTo: '/landing'
|
52
|
}
|
53
|
];
|
54
|
|
55
|
//export const appRoutingProviders: any[] = [];
|
56
|
|
57
|
//export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
|
58
|
|
59
|
|
60
|
@NgModule ({
|
61
|
imports: [RouterModule.forRoot(appRoutes)],
|
62
|
exports: [RouterModule]
|
63
|
})
|
64
|
|
65
|
export class AppRouting {}
|
66
|
|