Revision 61398
Added by Konstantinos Triantafyllou over 2 years ago
app.routing.ts | ||
---|---|---|
1 | 1 |
import {NgModule} from '@angular/core'; |
2 |
import {Routes, RouterModule, PreloadAllModules} from '@angular/router';
|
|
2 |
import {RouterModule, Routes} from '@angular/router';
|
|
3 | 3 |
import {ErrorPageComponent} from './openaireLibrary/error/errorPage.component'; |
4 | 4 |
import {PreviousRouteRecorder} from './openaireLibrary/utils/piwik/previousRouteRecorder.guard'; |
5 | 5 |
|
6 | 6 |
const appRoutes: Routes = [ |
7 | 7 |
{ |
8 | 8 |
path: '', |
9 |
loadChildren: './home/home.module#HomeModule',
|
|
9 |
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
|
|
10 | 10 |
data: { |
11 | 11 |
isHome: true |
12 | 12 |
}, canDeactivate: [PreviousRouteRecorder] |
13 | 13 |
}, |
14 | 14 |
{ |
15 | 15 |
path: 'resources', |
16 |
loadChildren: './resources/resources.module#ResourcesModule',
|
|
16 |
loadChildren: () => import('./resources/resources.module').then(m => m.ResourcesModule),
|
|
17 | 17 |
canDeactivate: [PreviousRouteRecorder] |
18 | 18 |
}, |
19 | 19 |
{ |
20 | 20 |
path: 'support', |
21 |
loadChildren: './contact/contact.module#ContactModule',
|
|
21 |
loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule),
|
|
22 | 22 |
canDeactivate: [PreviousRouteRecorder] |
23 | 23 |
}, |
24 | 24 |
{ |
25 | 25 |
path: 'about', |
26 |
loadChildren: './about/about.module#AboutModule',
|
|
26 |
loadChildren: () => import('./about/about.module').then(m => m.AboutModule),
|
|
27 | 27 |
canDeactivate: [PreviousRouteRecorder] |
28 | 28 |
}, |
29 | 29 |
{ path: '**',pathMatch: 'full',component: ErrorPageComponent} |
... | ... | |
31 | 31 |
|
32 | 32 |
@NgModule({ |
33 | 33 |
imports: [RouterModule.forRoot(appRoutes, { |
34 |
preloadingStrategy: PreloadAllModules, |
|
35 |
onSameUrlNavigation: "reload", |
|
36 |
relativeLinkResolution: 'corrected' |
|
34 |
onSameUrlNavigation: "reload" |
|
37 | 35 |
})], |
38 | 36 |
exports: [RouterModule] |
39 | 37 |
}) |
Also available in: Unified diff
[Graph]: Update trunk to angular 11. Delete branch from angular 11