mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
[DURACOM-191] change routing for health-page
This commit is contained in:
@@ -223,8 +223,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: HEALTH_PAGE_PATH,
|
path: HEALTH_PAGE_PATH,
|
||||||
loadChildren: () => import('./health-page/health-page.module')
|
loadChildren: () => import('./health-page/health-page-routes')
|
||||||
.then((m) => m.HealthPageModule)
|
.then((m) => m.ROUTES)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ACCESS_CONTROL_MODULE_PATH,
|
path: ACCESS_CONTROL_MODULE_PATH,
|
||||||
|
21
src/app/health-page/health-page-routes.ts
Normal file
21
src/app/health-page/health-page-routes.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { Route } from '@angular/router';
|
||||||
|
|
||||||
|
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
|
import { HealthPageComponent } from './health-page.component';
|
||||||
|
import {
|
||||||
|
SiteAdministratorGuard
|
||||||
|
} from '../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
|
||||||
|
|
||||||
|
export const ROUTES: Route[] = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
resolve: { breadcrumb: I18nBreadcrumbResolver },
|
||||||
|
data: {
|
||||||
|
breadcrumbKey: 'health',
|
||||||
|
title: 'health-page.title',
|
||||||
|
},
|
||||||
|
canActivate: [SiteAdministratorGuard],
|
||||||
|
component: HealthPageComponent
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@@ -1,31 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
import { HealthPageRoutingModule } from './health-page.routing.module';
|
|
||||||
import { HealthPanelComponent } from './health-panel/health-panel.component';
|
|
||||||
import { HealthStatusComponent } from './health-panel/health-status/health-status.component';
|
|
||||||
import { HealthPageComponent } from './health-page.component';
|
|
||||||
import { HealthComponentComponent } from './health-panel/health-component/health-component.component';
|
|
||||||
import { HealthInfoComponent } from './health-info/health-info.component';
|
|
||||||
import { HealthInfoComponentComponent } from './health-info/health-info-component/health-info-component.component';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
HealthPageRoutingModule,
|
|
||||||
NgbModule,
|
|
||||||
TranslateModule,
|
|
||||||
HealthPageComponent,
|
|
||||||
HealthPanelComponent,
|
|
||||||
HealthStatusComponent,
|
|
||||||
HealthComponentComponent,
|
|
||||||
HealthInfoComponent,
|
|
||||||
HealthInfoComponentComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class HealthPageModule {
|
|
||||||
}
|
|
@@ -1,28 +0,0 @@
|
|||||||
import { RouterModule } from '@angular/router';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
|
||||||
import { HealthPageComponent } from './health-page.component';
|
|
||||||
import {
|
|
||||||
SiteAdministratorGuard
|
|
||||||
} from '../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
RouterModule.forChild([
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
resolve: { breadcrumb: I18nBreadcrumbResolver },
|
|
||||||
data: {
|
|
||||||
breadcrumbKey: 'health',
|
|
||||||
title: 'health-page.title',
|
|
||||||
},
|
|
||||||
canActivate: [SiteAdministratorGuard],
|
|
||||||
component: HealthPageComponent
|
|
||||||
}
|
|
||||||
])
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class HealthPageRoutingModule {
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user