Project

General

Profile

1
import { RouterModule, Routes } from '@angular/router';
2
import { NgModule } from '@angular/core';
3
import { ContinentComponent } from './continent.component';
4
import { ContinentOverviewComponent } from './overview/continent-overview.compopnent';
5

    
6
const continentRoutes: Routes = [
7
  {
8
    path: ':continentName',
9
    component: ContinentComponent,
10
    children: [
11
      {
12
        path: '',
13
        redirectTo: 'overview',
14
        // pathMatch: 'full'
15
      },
16
      {
17
        path: 'overview',
18
        component: ContinentOverviewComponent
19
      },
20
      {
21
        path: 'open-science',
22
        loadChildren: () => import('./open-science/continent-open-science.module').then(m => m.ContinentOpenScienceModule),
23
      },
24
      {
25
        path: 'collaboration',
26
        loadChildren: () => import('./collaboration/continent-collaboration.module').then(m => m.ContinentCollaborationModule),
27
      }
28
    ]
29
  }
30
];
31

    
32
@NgModule ({
33
  imports: [RouterModule.forChild(continentRoutes)],
34
  exports: [RouterModule]
35
})
36

    
37
export class ContinentRoutingModule {}
(1-1/4)