[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:
Andrea Barbasso
2024-01-10 10:04:47 +01:00
parent d1e986a443
commit a2d66c6e34
3 changed files with 15 additions and 24 deletions

View File

@@ -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]
},
{

View File

@@ -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

View File

@@ -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