2020-09-15 15:54:41 +02:00
|
|
|
import {NgModule} from '@angular/core';
|
2021-07-14 17:23:45 +02:00
|
|
|
import {RouterModule, Routes} from '@angular/router';
|
2020-11-16 13:50:52 +01:00
|
|
|
import {PreviousRouteRecorder} from './openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
|
|
|
import {ErrorPageComponent} from './openaireLibrary/error/errorPage.component';
|
2020-06-12 15:22:36 +02:00
|
|
|
|
|
|
|
const appRoutes: Routes = [
|
2020-06-15 17:26:14 +02:00
|
|
|
{
|
|
|
|
path: '',
|
2021-07-14 17:23:45 +02:00
|
|
|
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
|
2020-09-15 15:54:41 +02:00
|
|
|
data: {
|
|
|
|
isHome: true
|
2020-11-16 13:50:52 +01:00
|
|
|
},
|
|
|
|
canDeactivate: [PreviousRouteRecorder]
|
2020-06-15 17:26:14 +02:00
|
|
|
},
|
2020-09-14 17:09:23 +02:00
|
|
|
{
|
|
|
|
path: 'resources',
|
2021-07-14 17:23:45 +02:00
|
|
|
loadChildren: () => import('./resources/resources.module').then(m => m.ResourcesModule),
|
2020-11-16 13:50:52 +01:00
|
|
|
canDeactivate: [PreviousRouteRecorder]
|
2020-09-14 17:09:23 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'analytics',
|
2021-07-14 17:23:45 +02:00
|
|
|
loadChildren: () => import('./analytics/analytics.module').then(m => m.AnalyticsModule),
|
2020-11-16 13:50:52 +01:00
|
|
|
canDeactivate: [PreviousRouteRecorder]
|
2020-09-14 17:09:23 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'contact',
|
2021-07-14 17:23:45 +02:00
|
|
|
loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule),
|
2020-11-16 13:50:52 +01:00
|
|
|
canDeactivate: [PreviousRouteRecorder]
|
2020-09-14 17:09:23 +02:00
|
|
|
},
|
2020-06-15 17:26:14 +02:00
|
|
|
{
|
|
|
|
path: 'about',
|
2021-07-14 17:23:45 +02:00
|
|
|
loadChildren: () => import('./about/about.module').then(m => m.AboutModule),
|
2020-11-16 13:50:52 +01:00
|
|
|
canDeactivate: [PreviousRouteRecorder]
|
2020-06-15 17:26:14 +02:00
|
|
|
},
|
|
|
|
{
|
2020-09-15 15:54:41 +02:00
|
|
|
path: 'sushilite/:id',
|
2021-07-14 17:23:45 +02:00
|
|
|
loadChildren: () => import('./sushilite/sushilite.module').then(m => m.SushiliteModule),
|
2020-11-16 13:50:52 +01:00
|
|
|
canDeactivate: [PreviousRouteRecorder]
|
|
|
|
},
|
|
|
|
{ path: '**',pathMatch: 'full',component: ErrorPageComponent}
|
2020-09-15 15:54:41 +02:00
|
|
|
];
|
2020-06-12 15:22:36 +02:00
|
|
|
|
|
|
|
@NgModule({
|
2020-09-15 15:54:41 +02:00
|
|
|
imports: [RouterModule.forRoot(appRoutes, {
|
2021-07-14 17:23:45 +02:00
|
|
|
onSameUrlNavigation: "reload"
|
2020-09-15 15:54:41 +02:00
|
|
|
})],
|
|
|
|
exports: [RouterModule]
|
2020-06-12 15:22:36 +02:00
|
|
|
})
|
2020-09-15 15:54:41 +02:00
|
|
|
export class AppRoutingModule {
|
|
|
|
}
|