Project

General

Profile

1 57592 stefania.m
import { NgModule } from '@angular/core';
2
import { Routes, RouterModule } from '@angular/router';
3
import { HomeComponent } from './pages/home/home.component';
4
import { CountriesMapOverviewComponent } from './pages/home/countries-map-overview.component';
5 58610 stefania.m
import { CountryPageComponent } from './pages/countrypage/country-page.component';
6
import { MethodologyPageComponent } from './pages/methodology/methodology.component';
7 58825 stefania.m
import { ContinentOverviewComponent } from './pages/continentoverview/continent-overview.component';
8 57592 stefania.m
9
const routes: Routes = [
10
  {
11
    path: '',
12
    redirectTo: '/home',
13
    pathMatch: 'full'
14
  },
15
  {
16
    path: 'home',
17
    component: HomeComponent
18
  },
19
  {
20
    path: 'overview-map-embed',
21
    component: CountriesMapOverviewComponent
22
  },
23 57666 stefania.m
  {
24 58825 stefania.m
    path: 'overview/:continentName',
25
    component: ContinentOverviewComponent
26
  },
27
  {
28 58853 stefania.m
    path: 'countryDashboard/:countryCode',
29 57666 stefania.m
    component: CountryPageComponent
30
  },
31 58610 stefania.m
  {
32
    path: 'methodology',
33
    component: MethodologyPageComponent
34
  },
35 57592 stefania.m
];
36
37
@NgModule({
38 60843 stefania.m
  imports: [RouterModule.forRoot(routes, {
39
    // preloadingStrategy: PreloadAllModules,
40 60850 stefania.m
    // scrollPositionRestoration: 'top',
41 60843 stefania.m
    onSameUrlNavigation: 'reload',
42
    // relativeLinkResolution: 'corrected'
43
  })],
44 57592 stefania.m
  exports: [RouterModule]
45
})
46
export class AppRoutingModule { }