mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] change routing for community-list-page
can't delete module - for now - since it has providers in it
This commit is contained in:
@@ -74,14 +74,14 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'id',
|
path: 'id',
|
||||||
loadChildren: () => import('./lookup-by-id/lookup-by-id.module')
|
loadChildren: () => import('./lookup-by-id/lookup-by-id-routes')
|
||||||
.then((m) => m.LookupIdModule),
|
.then((m) => m.ROUTES),
|
||||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'handle',
|
path: 'handle',
|
||||||
loadChildren: () => import('./lookup-by-id/lookup-by-id.module')
|
loadChildren: () => import('./lookup-by-id/lookup-by-id-routes')
|
||||||
.then((m) => m.LookupIdModule),
|
.then((m) => m.ROUTES),
|
||||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -1,26 +1,19 @@
|
|||||||
import { LookupGuard } from './lookup-guard';
|
import { LookupGuard } from './lookup-guard';
|
||||||
import { NgModule } from '@angular/core';
|
import { Route, UrlSegment } from '@angular/router';
|
||||||
import { RouterModule, UrlSegment } from '@angular/router';
|
|
||||||
import { isNotEmpty } from '../shared/empty.util';
|
import { isNotEmpty } from '../shared/empty.util';
|
||||||
import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component';
|
import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component';
|
||||||
|
|
||||||
@NgModule({
|
export const ROUTES: Route[] = [
|
||||||
imports: [
|
{
|
||||||
RouterModule.forChild([
|
matcher: urlMatcher,
|
||||||
{
|
providers: [
|
||||||
matcher: urlMatcher,
|
LookupGuard
|
||||||
canActivate: [LookupGuard],
|
],
|
||||||
component: ThemedObjectNotFoundComponent }
|
canActivate: [LookupGuard],
|
||||||
])
|
component: ThemedObjectNotFoundComponent
|
||||||
],
|
}
|
||||||
providers: [
|
];
|
||||||
LookupGuard
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
export class LookupRoutingModule {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export function urlMatcher(url) {
|
export function urlMatcher(url) {
|
||||||
// The expected path is :idType/:id
|
// The expected path is :idType/:id
|
@@ -1,13 +1,11 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { LookupRoutingModule } from './lookup-by-id-routing.module';
|
|
||||||
import { ObjectNotFoundComponent } from './objectnotfound/objectnotfound.component';
|
import { ObjectNotFoundComponent } from './objectnotfound/objectnotfound.component';
|
||||||
import { DsoRedirectService } from '../core/data/dso-redirect.service';
|
import { DsoRedirectService } from '../core/data/dso-redirect.service';
|
||||||
import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component';
|
import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
LookupRoutingModule,
|
|
||||||
CommonModule,
|
CommonModule,
|
||||||
ObjectNotFoundComponent,
|
ObjectNotFoundComponent,
|
||||||
ThemedObjectNotFoundComponent
|
ThemedObjectNotFoundComponent
|
||||||
|
Reference in New Issue
Block a user