Project

General

Profile

1
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
import { CountryPageComponent } from './pages/countrypage/country-page.component';
6
import { MethodologyPageComponent } from './pages/methodology/methodology.component';
7

    
8
const routes: Routes = [
9
  {
10
    path: '',
11
    redirectTo: '/home',
12
    pathMatch: 'full'
13
  },
14
  {
15
    path: 'home',
16
    component: HomeComponent
17
  },
18
  {
19
    path: 'overview-map-embed',
20
    component: CountriesMapOverviewComponent
21
  },
22
  {
23
    path: 'countryDashboard/:countryName',
24
    component: CountryPageComponent
25
  },
26
  {
27
    path: 'methodology',
28
    component: MethodologyPageComponent
29
  },
30
];
31

    
32
@NgModule({
33
  imports: [RouterModule.forRoot(routes)],
34
  exports: [RouterModule]
35
})
36
export class AppRoutingModule { }
(1-1/6)