2019-11-13 11:22:40 +01:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { HomeComponent } from './pages/home/home.component';
|
|
|
|
import { CountriesMapOverviewComponent } from './pages/home/countries-map-overview.component';
|
2020-05-05 22:34:12 +02:00
|
|
|
import { CountryPageComponent } from './pages/countrypage/country-page.component';
|
|
|
|
import { MethodologyPageComponent } from './pages/methodology/methodology.component';
|
2020-06-03 00:28:13 +02:00
|
|
|
import { ContinentOverviewComponent } from './pages/continentoverview/continent-overview.component';
|
2019-11-13 11:22:40 +01:00
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
redirectTo: '/home',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'home',
|
|
|
|
component: HomeComponent
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'overview-map-embed',
|
|
|
|
component: CountriesMapOverviewComponent
|
|
|
|
},
|
2020-06-03 00:28:13 +02:00
|
|
|
{
|
|
|
|
path: 'overview/:continentName',
|
|
|
|
component: ContinentOverviewComponent
|
|
|
|
},
|
2019-11-22 11:48:20 +01:00
|
|
|
{
|
2020-06-05 02:29:16 +02:00
|
|
|
path: 'countryDashboard/:countryCode',
|
2019-11-22 11:48:20 +01:00
|
|
|
component: CountryPageComponent
|
|
|
|
},
|
2020-05-05 22:34:12 +02:00
|
|
|
{
|
|
|
|
path: 'methodology',
|
|
|
|
component: MethodologyPageComponent
|
|
|
|
},
|
2019-11-13 11:22:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2021-04-12 23:22:31 +02:00
|
|
|
imports: [RouterModule.forRoot(routes, {
|
|
|
|
// preloadingStrategy: PreloadAllModules,
|
2021-04-13 14:21:32 +02:00
|
|
|
// scrollPositionRestoration: 'top',
|
2021-04-12 23:22:31 +02:00
|
|
|
onSameUrlNavigation: 'reload',
|
|
|
|
// relativeLinkResolution: 'corrected'
|
|
|
|
})],
|
2019-11-13 11:22:40 +01:00
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class AppRoutingModule { }
|