From d72c2848f2870a1e3bf09cf9eb3b620a1e6b320b Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 14 Mar 2024 16:52:09 +0100 Subject: [PATCH] [DURACOM-191] Remove app-routing.module --- src/app/app-routes.ts | 295 +++++++++++++++++++++++++++++++++ src/app/app-routing.module.ts | 304 ---------------------------------- src/app/app.module.ts | 11 +- 3 files changed, 304 insertions(+), 306 deletions(-) create mode 100644 src/app/app-routes.ts delete mode 100644 src/app/app-routing.module.ts diff --git a/src/app/app-routes.ts b/src/app/app-routes.ts new file mode 100644 index 0000000000..342e1731af --- /dev/null +++ b/src/app/app-routes.ts @@ -0,0 +1,295 @@ +import { importProvidersFrom } from '@angular/core'; +import { + ExtraOptions, + NoPreloading, + Route, +} from '@angular/router'; +import { EffectsModule } from '@ngrx/effects'; +import { + Action, + StoreConfig, + StoreModule, +} from '@ngrx/store'; + +import { NOTIFICATIONS_MODULE_PATH } from './admin/admin-routing-paths'; +import { storeModuleConfig } from './app.reducer'; +import { + ACCESS_CONTROL_MODULE_PATH, + ADMIN_MODULE_PATH, + BITSTREAM_MODULE_PATH, + ERROR_PAGE, + FORBIDDEN_PATH, + FORGOT_PASSWORD_PATH, + HEALTH_PAGE_PATH, + INFO_MODULE_PATH, + INTERNAL_SERVER_ERROR, + LEGACY_BITSTREAM_MODULE_PATH, + PROFILE_MODULE_PATH, + REGISTER_PATH, + REQUEST_COPY_MODULE_PATH, + WORKFLOW_ITEM_MODULE_PATH, +} from './app-routing-paths'; +import { COLLECTION_MODULE_PATH } from './collection-page/collection-page-routing-paths'; +import { COMMUNITY_MODULE_PATH } from './community-page/community-page-routing-paths'; +import { AuthBlockingGuard } from './core/auth/auth-blocking.guard'; +import { AuthenticatedGuard } from './core/auth/authenticated.guard'; +import { GroupAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/group-administrator.guard'; +import { SiteRegisterGuard } from './core/data/feature-authorization/feature-authorization-guard/site-register.guard'; +import { EndUserAgreementCurrentUserGuard } from './core/end-user-agreement/end-user-agreement-current-user.guard'; +import { ReloadGuard } from './core/reload/reload.guard'; +import { ForgotPasswordCheckGuard } from './core/rest-property/forgot-password-check-guard.guard'; +import { ServerCheckGuard } from './core/server-check/server-check.guard'; +import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component'; +import { ITEM_MODULE_PATH } from './item-page/item-page-routing-paths'; +import { MenuResolver } from './menu.resolver'; +import { ThemedPageErrorComponent } from './page-error/themed-page-error.component'; +import { ThemedPageInternalServerErrorComponent } from './page-internal-server-error/themed-page-internal-server-error.component'; +import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component'; +import { PROCESS_MODULE_PATH } from './process-page/process-page-routing.paths'; +import { submissionEffects } from './submission/submission.effects'; +import { + submissionReducers, + SubmissionState, +} from './submission/submission.reducers'; +import { SUGGESTION_MODULE_PATH } from './suggestions-page/suggestions-page-routing-paths'; + +export const APP_ROUTES: Route[] = [ + { path: INTERNAL_SERVER_ERROR, component: ThemedPageInternalServerErrorComponent }, + { path: ERROR_PAGE, component: ThemedPageErrorComponent }, + { + path: '', + canActivate: [AuthBlockingGuard], + canActivateChild: [ServerCheckGuard], + resolve: [MenuResolver], + children: [ + { path: '', redirectTo: '/home', pathMatch: 'full' }, + { + path: 'reload/:rnd', + component: ThemedPageNotFoundComponent, + pathMatch: 'full', + canActivate: [ReloadGuard], + }, + { + path: 'home', + loadChildren: () => import('./home-page/home-page-routes') + .then((m) => m.ROUTES), + data: { showBreadcrumbs: false }, + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'community-list', + loadChildren: () => import('./community-list-page/community-list-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'id', + 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-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: REGISTER_PATH, + loadChildren: () => import('./register-page/register-page-routes') + .then((m) => m.ROUTES), + canActivate: [SiteRegisterGuard], + }, + { + path: FORGOT_PASSWORD_PATH, + loadChildren: () => import('./forgot-password/forgot-password-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard, ForgotPasswordCheckGuard], + }, + { + path: COMMUNITY_MODULE_PATH, + loadChildren: () => import('./community-page/community-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: COLLECTION_MODULE_PATH, + loadChildren: () => import('./collection-page/collection-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: ITEM_MODULE_PATH, + loadChildren: () => import('./item-page/item-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'entities/:entity-type', + loadChildren: () => import('./item-page/item-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: LEGACY_BITSTREAM_MODULE_PATH, + loadChildren: () => import('./bitstream-page/bitstream-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: BITSTREAM_MODULE_PATH, + loadChildren: () => import('./bitstream-page/bitstream-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'mydspace', + loadChildren: () => import('./my-dspace-page/my-dspace-page-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: 'search', + loadChildren: () => import('./search-page/search-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'browse', + loadChildren: () => import('./browse-by/browse-by-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: ADMIN_MODULE_PATH, + loadChildren: () => import('./admin/admin-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: NOTIFICATIONS_MODULE_PATH, + loadChildren: () => import('./admin/admin-notifications/admin-notifications-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: NOTIFICATIONS_MODULE_PATH, + loadChildren: () => import('./quality-assurance-notifications-pages/notifications-pages-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: 'login', + loadChildren: () => import('./login-page/login-page-routes') + .then((m) => m.ROUTES), + }, + { + path: 'logout', + loadChildren: () => import('./logout-page/logout-page-routes') + .then((m) => m.ROUTES), + }, + { + path: 'submit', + loadChildren: () => import('./submit-page/submit-page-routes') + .then((m) => m.ROUTES), + providers: [ + importProvidersFrom( + StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig), + EffectsModule.forFeature(submissionEffects), + )], + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'import-external', + loadChildren: () => import('./import-external-page/import-external-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: 'workspaceitems', + loadChildren: () => import('./workspaceitems-edit-page/workspaceitems-edit-page-routes') + .then((m) => m.ROUTES), + providers: [ + importProvidersFrom( + StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig), + EffectsModule.forFeature(submissionEffects), + )], + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: WORKFLOW_ITEM_MODULE_PATH, + providers: [ + importProvidersFrom( + StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig), + EffectsModule.forFeature(submissionEffects), + )], + loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: PROFILE_MODULE_PATH, + loadChildren: () => import('./profile-page/profile-page-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: PROCESS_MODULE_PATH, + loadChildren: () => import('./process-page/process-page-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: SUGGESTION_MODULE_PATH, + loadChildren: () => import('./suggestions-page/suggestions-page-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: INFO_MODULE_PATH, + loadChildren: () => import('./info/info-routes').then((m) => m.ROUTES), + }, + { + path: REQUEST_COPY_MODULE_PATH, + loadChildren: () => import('./request-copy/request-copy-routes').then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: FORBIDDEN_PATH, + component: ThemedForbiddenComponent, + }, + { + path: 'statistics', + loadChildren: () => import('./statistics-page/statistics-page-routes') + .then((m) => m.ROUTES), + canActivate: [EndUserAgreementCurrentUserGuard], + }, + { + path: HEALTH_PAGE_PATH, + loadChildren: () => import('./health-page/health-page-routes') + .then((m) => m.ROUTES), + }, + { + path: ACCESS_CONTROL_MODULE_PATH, + loadChildren: () => import('./access-control/access-control-routes').then((m) => m.ROUTES), + canActivate: [GroupAdministratorGuard, EndUserAgreementCurrentUserGuard], + }, + { + path: 'subscriptions', + loadChildren: () => import('./subscriptions-page/subscriptions-page-routes') + .then((m) => m.ROUTES), + canActivate: [AuthenticatedGuard], + }, + { path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent }, + ], + }, +]; +export const APP_ROUTING_CONF: ExtraOptions = { + // enableTracing: true, + useHash: false, + scrollPositionRestoration: 'enabled', + anchorScrolling: 'enabled', + initialNavigation: 'enabledBlocking', + preloadingStrategy: NoPreloading, + onSameUrlNavigation: 'reload', +}; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts deleted file mode 100644 index 5fc32c9808..0000000000 --- a/src/app/app-routing.module.ts +++ /dev/null @@ -1,304 +0,0 @@ -import { - importProvidersFrom, - NgModule, -} from '@angular/core'; -import { - NoPreloading, - RouterModule, -} from '@angular/router'; -import { EffectsModule } from '@ngrx/effects'; -import { - Action, - StoreConfig, - StoreModule, -} from '@ngrx/store'; - -import { NOTIFICATIONS_MODULE_PATH } from './admin/admin-routing-paths'; -import { storeModuleConfig } from './app.reducer'; -import { - ACCESS_CONTROL_MODULE_PATH, - ADMIN_MODULE_PATH, - BITSTREAM_MODULE_PATH, - ERROR_PAGE, - FORBIDDEN_PATH, - FORGOT_PASSWORD_PATH, - HEALTH_PAGE_PATH, - INFO_MODULE_PATH, - INTERNAL_SERVER_ERROR, - LEGACY_BITSTREAM_MODULE_PATH, - PROFILE_MODULE_PATH, - REGISTER_PATH, - REQUEST_COPY_MODULE_PATH, - WORKFLOW_ITEM_MODULE_PATH, -} from './app-routing-paths'; -import { COLLECTION_MODULE_PATH } from './collection-page/collection-page-routing-paths'; -import { COMMUNITY_MODULE_PATH } from './community-page/community-page-routing-paths'; -import { AuthBlockingGuard } from './core/auth/auth-blocking.guard'; -import { AuthenticatedGuard } from './core/auth/authenticated.guard'; -import { GroupAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/group-administrator.guard'; -import { SiteRegisterGuard } from './core/data/feature-authorization/feature-authorization-guard/site-register.guard'; -import { EndUserAgreementCurrentUserGuard } from './core/end-user-agreement/end-user-agreement-current-user.guard'; -import { ReloadGuard } from './core/reload/reload.guard'; -import { ForgotPasswordCheckGuard } from './core/rest-property/forgot-password-check-guard.guard'; -import { ServerCheckGuard } from './core/server-check/server-check.guard'; -import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component'; -import { ITEM_MODULE_PATH } from './item-page/item-page-routing-paths'; -import { MenuResolver } from './menu.resolver'; -import { ThemedPageErrorComponent } from './page-error/themed-page-error.component'; -import { ThemedPageInternalServerErrorComponent } from './page-internal-server-error/themed-page-internal-server-error.component'; -import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component'; -import { PROCESS_MODULE_PATH } from './process-page/process-page-routing.paths'; -import { submissionEffects } from './submission/submission.effects'; -import { - submissionReducers, - SubmissionState, -} from './submission/submission.reducers'; -import { SUGGESTION_MODULE_PATH } from './suggestions-page/suggestions-page-routing-paths'; - -@NgModule({ - imports: [ - RouterModule.forRoot([ - { path: INTERNAL_SERVER_ERROR, component: ThemedPageInternalServerErrorComponent }, - { path: ERROR_PAGE, component: ThemedPageErrorComponent }, - { - path: '', - canActivate: [AuthBlockingGuard], - canActivateChild: [ServerCheckGuard], - resolve: [MenuResolver], - children: [ - { path: '', redirectTo: '/home', pathMatch: 'full' }, - { - path: 'reload/:rnd', - component: ThemedPageNotFoundComponent, - pathMatch: 'full', - canActivate: [ReloadGuard], - }, - { - path: 'home', - loadChildren: () => import('./home-page/home-page-routes') - .then((m) => m.ROUTES), - data: { showBreadcrumbs: false }, - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'community-list', - loadChildren: () => import('./community-list-page/community-list-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'id', - 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-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: REGISTER_PATH, - loadChildren: () => import('./register-page/register-page-routes') - .then((m) => m.ROUTES), - canActivate: [SiteRegisterGuard], - }, - { - path: FORGOT_PASSWORD_PATH, - loadChildren: () => import('./forgot-password/forgot-password-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard, ForgotPasswordCheckGuard], - }, - { - path: COMMUNITY_MODULE_PATH, - loadChildren: () => import('./community-page/community-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: COLLECTION_MODULE_PATH, - loadChildren: () => import('./collection-page/collection-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: ITEM_MODULE_PATH, - loadChildren: () => import('./item-page/item-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'entities/:entity-type', - loadChildren: () => import('./item-page/item-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: LEGACY_BITSTREAM_MODULE_PATH, - loadChildren: () => import('./bitstream-page/bitstream-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: BITSTREAM_MODULE_PATH, - loadChildren: () => import('./bitstream-page/bitstream-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'mydspace', - loadChildren: () => import('./my-dspace-page/my-dspace-page-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: 'search', - loadChildren: () => import('./search-page/search-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'browse', - loadChildren: () => import('./browse-by/browse-by-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: ADMIN_MODULE_PATH, - loadChildren: () => import('./admin/admin-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: NOTIFICATIONS_MODULE_PATH, - loadChildren: () => import('./admin/admin-notifications/admin-notifications-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: NOTIFICATIONS_MODULE_PATH, - loadChildren: () => import('./quality-assurance-notifications-pages/notifications-pages-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: 'login', - loadChildren: () => import('./login-page/login-page-routes') - .then((m) => m.ROUTES), - }, - { - path: 'logout', - loadChildren: () => import('./logout-page/logout-page-routes') - .then((m) => m.ROUTES), - }, - { - path: 'submit', - loadChildren: () => import('./submit-page/submit-page-routes') - .then((m) => m.ROUTES), - providers: [ - importProvidersFrom( - StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig), - EffectsModule.forFeature(submissionEffects), - )], - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'import-external', - loadChildren: () => import('./import-external-page/import-external-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: 'workspaceitems', - loadChildren: () => import('./workspaceitems-edit-page/workspaceitems-edit-page-routes') - .then((m) => m.ROUTES), - providers: [ - importProvidersFrom( - StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig), - EffectsModule.forFeature(submissionEffects), - )], - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: WORKFLOW_ITEM_MODULE_PATH, - providers: [ - importProvidersFrom( - StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig), - EffectsModule.forFeature(submissionEffects), - )], - loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: PROFILE_MODULE_PATH, - loadChildren: () => import('./profile-page/profile-page-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: PROCESS_MODULE_PATH, - loadChildren: () => import('./process-page/process-page-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: SUGGESTION_MODULE_PATH, - loadChildren: () => import('./suggestions-page/suggestions-page-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: INFO_MODULE_PATH, - loadChildren: () => import('./info/info-routes').then((m) => m.ROUTES), - }, - { - path: REQUEST_COPY_MODULE_PATH, - loadChildren: () => import('./request-copy/request-copy-routes').then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: FORBIDDEN_PATH, - component: ThemedForbiddenComponent, - }, - { - path: 'statistics', - loadChildren: () => import('./statistics-page/statistics-page-routes') - .then((m) => m.ROUTES), - canActivate: [EndUserAgreementCurrentUserGuard], - }, - { - path: HEALTH_PAGE_PATH, - loadChildren: () => import('./health-page/health-page-routes') - .then((m) => m.ROUTES), - }, - { - path: ACCESS_CONTROL_MODULE_PATH, - loadChildren: () => import('./access-control/access-control-routes').then((m) => m.ROUTES), - canActivate: [GroupAdministratorGuard, EndUserAgreementCurrentUserGuard], - }, - { - path: 'subscriptions', - loadChildren: () => import('./subscriptions-page/subscriptions-page-routes') - .then((m) => m.ROUTES), - canActivate: [AuthenticatedGuard], - }, - { path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent }, - ], - }, - ], { - // enableTracing: true, - useHash: false, - scrollPositionRestoration: 'enabled', - anchorScrolling: 'enabled', - initialNavigation: 'enabledBlocking', - preloadingStrategy: NoPreloading, - onSameUrlNavigation: 'reload', - }), - ], - exports: [RouterModule], -}) -export class AppRoutingModule { - -} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 54790cf2db..d631a1d252 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -9,6 +9,10 @@ import { } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { + provideRouter, + withRouterConfig, +} from '@angular/router'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DYNAMIC_MATCHER_PROVIDERS } from '@ng-dynamic-forms/core'; import { EffectsModule } from '@ngrx/effects'; @@ -43,7 +47,10 @@ import { AppState, storeModuleConfig, } from './app.reducer'; -import { AppRoutingModule } from './app-routing.module'; +import { + APP_ROUTES, + APP_ROUTING_CONF, +} from './app-routes'; import { BROWSE_BY_DECORATOR_MAP } from './browse-by/browse-by-switcher/browse-by-decorator'; import { AuthInterceptor } from './core/auth/auth.interceptor'; import { LocaleInterceptor } from './core/locale/locale.interceptor'; @@ -83,7 +90,6 @@ export function getMetaReducers(appConfig: AppConfig): MetaReducer[] { const IMPORTS = [ CommonModule, HttpClientModule, - AppRoutingModule, ScrollToModule.forRoot(), NgbModule, TranslateModule.forRoot(), @@ -97,6 +103,7 @@ const IMPORTS = [ ]; const PROVIDERS = [ + provideRouter(APP_ROUTES, withRouterConfig(APP_ROUTING_CONF)), { provide: APP_BASE_HREF, useFactory: getBaseHref,