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',
|
||||
loadChildren: () => import('./lookup-by-id/lookup-by-id.module')
|
||||
.then((m) => m.LookupIdModule),
|
||||
loadChildren: () => import('./lookup-by-id/lookup-by-id-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{
|
||||
path: 'handle',
|
||||
loadChildren: () => import('./lookup-by-id/lookup-by-id.module')
|
||||
.then((m) => m.LookupIdModule),
|
||||
loadChildren: () => import('./lookup-by-id/lookup-by-id-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{
|
||||
|
@@ -1,26 +1,19 @@
|
||||
import { LookupGuard } from './lookup-guard';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, UrlSegment } from '@angular/router';
|
||||
import { Route, UrlSegment } from '@angular/router';
|
||||
import { isNotEmpty } from '../shared/empty.util';
|
||||
import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
export const ROUTES: Route[] = [
|
||||
{
|
||||
matcher: urlMatcher,
|
||||
canActivate: [LookupGuard],
|
||||
component: ThemedObjectNotFoundComponent }
|
||||
])
|
||||
],
|
||||
providers: [
|
||||
LookupGuard
|
||||
]
|
||||
})
|
||||
|
||||
export class LookupRoutingModule {
|
||||
|
||||
],
|
||||
canActivate: [LookupGuard],
|
||||
component: ThemedObjectNotFoundComponent
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export function urlMatcher(url) {
|
||||
// The expected path is :idType/:id
|
@@ -1,13 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { LookupRoutingModule } from './lookup-by-id-routing.module';
|
||||
import { ObjectNotFoundComponent } from './objectnotfound/objectnotfound.component';
|
||||
import { DsoRedirectService } from '../core/data/dso-redirect.service';
|
||||
import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
LookupRoutingModule,
|
||||
CommonModule,
|
||||
ObjectNotFoundComponent,
|
||||
ThemedObjectNotFoundComponent
|
||||
|
Reference in New Issue
Block a user