mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DSC-287] reformat app-routing.module code
This commit is contained in:
@@ -11,10 +11,11 @@ import {
|
||||
FORBIDDEN_PATH,
|
||||
FORGOT_PASSWORD_PATH,
|
||||
INFO_MODULE_PATH,
|
||||
LEGACY_BITSTREAM_MODULE_PATH,
|
||||
PROFILE_MODULE_PATH,
|
||||
REGISTER_PATH,
|
||||
REQUEST_COPY_MODULE_PATH,
|
||||
WORKFLOW_ITEM_MODULE_PATH,
|
||||
LEGACY_BITSTREAM_MODULE_PATH, REQUEST_COPY_MODULE_PATH,
|
||||
} from './app-routing-paths';
|
||||
import { COLLECTION_MODULE_PATH } from './collection-page/collection-page-routing-paths';
|
||||
import { COMMUNITY_MODULE_PATH } from './community-page/community-page-routing-paths';
|
||||
@@ -29,14 +30,18 @@ import { GroupAdministratorGuard } from './core/data/feature-authorization/featu
|
||||
import { ThemedPageInternalServerErrorComponent } from './page-internal-server-error/themed-page-internal-server-error.component';
|
||||
import { ServerCheckGuard } from './core/server-check/server-check.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot([{
|
||||
path: '', canActivate: [AuthBlockingGuard],
|
||||
children: [
|
||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||
{ path: 'reload/:rnd', component: ThemedPageNotFoundComponent, pathMatch: 'full', canActivate: [ServerCheckGuard, ReloadGuard] },
|
||||
{
|
||||
path: 'reload/:rnd',
|
||||
component: ThemedPageNotFoundComponent,
|
||||
pathMatch: 'full',
|
||||
canActivate: [ServerCheckGuard, ReloadGuard]
|
||||
},
|
||||
{
|
||||
path: 'home',
|
||||
loadChildren: () => import('./home-page/home-page.module')
|
||||
@@ -92,7 +97,8 @@ import { ServerCheckGuard } from './core/server-check/server-check.guard';
|
||||
.then((m) => m.ItemPageModule),
|
||||
canActivate: [ServerCheckGuard, EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{ path: 'entities/:entity-type',
|
||||
{
|
||||
path: 'entities/:entity-type',
|
||||
loadChildren: () => import('./item-page/item-page.module')
|
||||
.then((m) => m.ItemPageModule),
|
||||
canActivate: [ServerCheckGuard, EndUserAgreementCurrentUserGuard]
|
||||
@@ -208,7 +214,8 @@ import { ServerCheckGuard } from './core/server-check/server-check.guard';
|
||||
},
|
||||
{ path: '500', component: ThemedPageInternalServerErrorComponent },
|
||||
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent },
|
||||
]}
|
||||
]
|
||||
}
|
||||
], {
|
||||
onSameUrlNavigation: 'reload',
|
||||
})
|
||||
|
Reference in New Issue
Block a user