1
|
import {NgModule} from '@angular/core';
|
2
|
import {RouterModule, Routes} from '@angular/router';
|
3
|
import {PreviousRouteRecorder} from './openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
4
|
import {ErrorPageComponent} from './openaireLibrary/error/errorPage.component';
|
5
|
|
6
|
const appRoutes: Routes = [
|
7
|
{
|
8
|
path: '',
|
9
|
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
|
10
|
data: {
|
11
|
isHome: true
|
12
|
},
|
13
|
canDeactivate: [PreviousRouteRecorder]
|
14
|
},
|
15
|
{
|
16
|
path: 'resources',
|
17
|
loadChildren: () => import('./resources/resources.module').then(m => m.ResourcesModule),
|
18
|
canDeactivate: [PreviousRouteRecorder]
|
19
|
},
|
20
|
{
|
21
|
path: 'analytics',
|
22
|
loadChildren: () => import('./analytics/analytics.module').then(m => m.AnalyticsModule),
|
23
|
canDeactivate: [PreviousRouteRecorder]
|
24
|
},
|
25
|
{
|
26
|
path: 'contact',
|
27
|
loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule),
|
28
|
canDeactivate: [PreviousRouteRecorder]
|
29
|
},
|
30
|
{
|
31
|
path: 'about',
|
32
|
loadChildren: () => import('./about/about.module').then(m => m.AboutModule),
|
33
|
canDeactivate: [PreviousRouteRecorder]
|
34
|
},
|
35
|
{
|
36
|
path: 'sushilite/:id',
|
37
|
loadChildren: () => import('./sushilite/sushilite.module').then(m => m.SushiliteModule),
|
38
|
canDeactivate: [PreviousRouteRecorder]
|
39
|
},
|
40
|
{ path: '**',pathMatch: 'full',component: ErrorPageComponent}
|
41
|
];
|
42
|
|
43
|
@NgModule({
|
44
|
imports: [RouterModule.forRoot(appRoutes, {
|
45
|
onSameUrlNavigation: "reload"
|
46
|
})],
|
47
|
exports: [RouterModule]
|
48
|
})
|
49
|
export class AppRoutingModule {
|
50
|
}
|