[DURACOM-191] change routing for community-list-page, delete community-list-page.module.ts

This commit is contained in:
Andrea Barbasso
2024-01-10 09:58:08 +01:00
parent 6e70aad7b8
commit d1e986a443
6 changed files with 23 additions and 70 deletions

View File

@@ -68,8 +68,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
},
{
path: 'community-list',
loadChildren: () => import('./community-list-page/community-list-page.module')
.then((m) => m.CommunityListPageModule),
loadChildren: () => import('./community-list-page/community-list-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard]
},
{

View File

@@ -0,0 +1,21 @@
import { Route } from '@angular/router';
import { CommunityListService } from './community-list-service';
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
/**
* RouterModule to help navigate to the page with the community list tree
*/
export const ROUTES: Route[] = [
{
path: '',
component: ThemedCommunityListPageComponent,
pathMatch: 'full',
providers: [CommunityListService],
resolve: {
breadcrumb: I18nBreadcrumbResolver
},
data: {title: 'communityList.tabTitle', breadcrumbKey: 'communityList'}
}
];

View File

@@ -1,34 +0,0 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { CommunityListPageComponent } from './community-list-page.component';
import { CommunityListPageRoutingModule } from './community-list-page.routing.module';
import { CommunityListComponent } from './community-list/community-list.component';
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
import { ThemedCommunityListComponent } from './community-list/themed-community-list.component';
import { CdkTreeModule } from '@angular/cdk/tree';
const DECLARATIONS = [
CommunityListPageComponent,
CommunityListComponent,
ThemedCommunityListPageComponent,
ThemedCommunityListComponent
];
/**
* The page which houses a title and the community list, as described in community-list.component
*/
@NgModule({
imports: [
CommonModule,
CommunityListPageRoutingModule,
CdkTreeModule,
...DECLARATIONS
],
exports: [
...DECLARATIONS,
CdkTreeModule,
]
})
export class CommunityListPageModule {
}

View File

@@ -1,30 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CdkTreeModule } from '@angular/cdk/tree';
import { CommunityListService } from './community-list-service';
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
/**
* RouterModule to help navigate to the page with the community list tree
*/
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: ThemedCommunityListPageComponent,
pathMatch: 'full',
resolve: {
breadcrumb: I18nBreadcrumbResolver
},
data: { title: 'communityList.tabTitle', breadcrumbKey: 'communityList' }
}
]),
CdkTreeModule,
],
providers: [CommunityListService]
})
export class CommunityListPageRoutingModule {
}

View File

@@ -23,7 +23,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { AppModule } from '../../app/app.module';
import { ItemPageModule } from '../../app/item-page/item-page.module';
import { RouterModule } from '@angular/router';
import { CommunityListPageModule } from '../../app/community-list-page/community-list-page.module';
import { InfoModule } from '../../app/info/info.module';
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
import { CommunityPageModule } from '../../app/community-page/community-page.module';
@@ -274,7 +273,6 @@ const DECLARATIONS = [
CollectionPageModule,
CommonModule,
CommunityFormModule,
CommunityListPageModule,
CommunityPageModule,
DragDropModule,
ItemSharedModule,

View File

@@ -23,7 +23,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { AppModule } from '../../app/app.module';
import { ItemPageModule } from '../../app/item-page/item-page.module';
import { RouterModule } from '@angular/router';
import { CommunityListPageModule } from '../../app/community-list-page/community-list-page.module';
import { InfoModule } from '../../app/info/info.module';
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
import { CommunityPageModule } from '../../app/community-page/community-page.module';
@@ -55,7 +54,6 @@ const DECLARATIONS = [
CollectionPageModule,
CommonModule,
CommunityFormModule,
CommunityListPageModule,
CommunityPageModule,
DragDropModule,
ItemSharedModule,