diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b7436c982a..a2c7b38261 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -192,8 +192,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone }, { path: PROFILE_MODULE_PATH, - loadChildren: () => import('./profile-page/profile-page.module') - .then((m) => m.ProfilePageModule), + loadChildren: () => import('./profile-page/profile-page-routes') + .then((m) => m.ROUTES), canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard] }, { diff --git a/src/app/profile-page/profile-page-routes.ts b/src/app/profile-page/profile-page-routes.ts new file mode 100644 index 0000000000..3cd9134253 --- /dev/null +++ b/src/app/profile-page/profile-page-routes.ts @@ -0,0 +1,13 @@ +import { Route } from '@angular/router'; +import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; +import { ThemedProfilePageComponent } from './themed-profile-page.component'; + +export const ROUTES: Route[] = [ + { + path: '', + pathMatch: 'full', + component: ThemedProfilePageComponent, + resolve: {breadcrumb: I18nBreadcrumbResolver}, + data: {breadcrumbKey: 'profile', title: 'profile.title'} + } +]; diff --git a/src/app/profile-page/profile-page-routing.module.ts b/src/app/profile-page/profile-page-routing.module.ts deleted file mode 100644 index 695a78837f..0000000000 --- a/src/app/profile-page/profile-page-routing.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; -import { ThemedProfilePageComponent } from './themed-profile-page.component'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', pathMatch: 'full', component: ThemedProfilePageComponent, resolve: { breadcrumb: I18nBreadcrumbResolver }, data: { breadcrumbKey: 'profile', title: 'profile.title' } } - ]) - ] -}) -export class ProfilePageRoutingModule { - -} diff --git a/src/app/profile-page/profile-page.module.ts b/src/app/profile-page/profile-page.module.ts deleted file mode 100644 index 000414e0ea..0000000000 --- a/src/app/profile-page/profile-page.module.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ProfilePageRoutingModule } from './profile-page-routing.module'; -import { ProfilePageComponent } from './profile-page.component'; -import { ProfilePageMetadataFormComponent } from './profile-page-metadata-form/profile-page-metadata-form.component'; -import { ProfilePageSecurityFormComponent } from './profile-page-security-form/profile-page-security-form.component'; -import { - ProfilePageResearcherFormComponent -} from './profile-page-researcher-form/profile-page-researcher-form.component'; -import { ThemedProfilePageComponent } from './themed-profile-page.component'; -import { FormModule } from '../shared/form/form.module'; -import { UiSwitchModule } from 'ngx-ui-switch'; -import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profile-claim-item-modal.component'; - - -@NgModule({ - imports: [ - ProfilePageRoutingModule, - CommonModule, - FormModule, - UiSwitchModule, - ProfilePageComponent, - ThemedProfilePageComponent, - ProfileClaimItemModalComponent, - ProfilePageMetadataFormComponent, - ProfilePageSecurityFormComponent, - ProfilePageResearcherFormComponent - ], - exports: [ - ProfilePageComponent, - ThemedProfilePageComponent, - ProfilePageMetadataFormComponent, - ProfilePageSecurityFormComponent, - ProfilePageResearcherFormComponent - ] -}) -export class ProfilePageModule { - -} diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index cca6507243..c651264166 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -10,7 +10,6 @@ import { IdlePreloadModule } from 'angular-idle-preload'; import { MenuModule } from '../../app/shared/menu/menu.module'; import { NavbarModule } from '../../app/navbar/navbar.module'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { ProfilePageModule } from '../../app/profile-page/profile-page.module'; import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module'; import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to'; import { SearchPageModule } from '../../app/search-page/search-page.module'; @@ -281,7 +280,6 @@ const DECLARATIONS = [ DsoPageModule, NavbarModule, NgbModule, - ProfilePageModule, RegisterEmailFormModule, RouterModule, ScrollToModule, diff --git a/src/themes/dspace/lazy-theme.module.ts b/src/themes/dspace/lazy-theme.module.ts index a42e161108..07a5a700d7 100644 --- a/src/themes/dspace/lazy-theme.module.ts +++ b/src/themes/dspace/lazy-theme.module.ts @@ -10,7 +10,6 @@ import { IdlePreloadModule } from 'angular-idle-preload'; import { MenuModule } from '../../app/shared/menu/menu.module'; import { NavbarModule } from '../../app/navbar/navbar.module'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { ProfilePageModule } from '../../app/profile-page/profile-page.module'; import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module'; import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to'; import { SearchPageModule } from '../../app/search-page/search-page.module'; @@ -61,7 +60,6 @@ const DECLARATIONS = [ MenuModule, NavbarModule, NgbModule, - ProfilePageModule, RegisterEmailFormModule, RouterModule, ScrollToModule,