47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
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';
|
|
import { CountryPageComponent } from './pages/countrypage/country-page.component';
|
|
import { MethodologyPageComponent } from './pages/methodology/methodology.component';
|
|
import { ContinentOverviewComponent } from './pages/continentoverview/continent-overview.component';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: '',
|
|
redirectTo: '/home',
|
|
pathMatch: 'full'
|
|
},
|
|
{
|
|
path: 'home',
|
|
component: HomeComponent
|
|
},
|
|
{
|
|
path: 'overview-map-embed',
|
|
component: CountriesMapOverviewComponent
|
|
},
|
|
{
|
|
path: 'overview/:continentName',
|
|
component: ContinentOverviewComponent
|
|
},
|
|
{
|
|
path: 'countryDashboard/:countryCode',
|
|
component: CountryPageComponent
|
|
},
|
|
{
|
|
path: 'methodology',
|
|
component: MethodologyPageComponent
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes, {
|
|
// preloadingStrategy: PreloadAllModules,
|
|
// scrollPositionRestoration: 'top',
|
|
onSameUrlNavigation: 'reload',
|
|
// relativeLinkResolution: 'corrected'
|
|
})],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|