From 9d6d2cad66194cbf56ed6f6705ae5bb3687d4b2f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 26 Jun 2020 14:24:00 -0400 Subject: [PATCH] LP1864371 Migrate deprecated loadChildren invocations https://angular.io/guide/deprecations#loadchildren-string-syntax Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/routing.module.ts | 2 +- .../app/staff/admin/local/routing.module.ts | 3 ++- .../eg2/src/app/staff/admin/routing.module.ts | 19 ++++++++++++------- .../app/staff/admin/server/routing.module.ts | 6 ++++-- .../staff/admin/workstation/routing.module.ts | 3 ++- .../eg2/src/app/staff/cat/routing.module.ts | 6 ++++-- .../app/staff/circ/patron/routing.module.ts | 3 ++- .../eg2/src/app/staff/circ/routing.module.ts | 3 ++- .../src/eg2/src/app/staff/routing.module.ts | 18 ++++++++++++------ Open-ILS/src/eg2/tsconfig.json | 2 +- 10 files changed, 42 insertions(+), 23 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/routing.module.ts b/Open-ILS/src/eg2/src/app/routing.module.ts index db3ee19dce..3b7d2e312a 100644 --- a/Open-ILS/src/eg2/src/app/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/routing.module.ts @@ -16,7 +16,7 @@ const routes: Routes = [ }, { path: 'staff', resolve : {startup : BaseResolver}, - loadChildren: './staff/staff.module#StaffModule' + loadChildren: () => import('./staff/staff.module').then(m => m.StaffModule) } ]; diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts index 15a9153201..c29e7e643d 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts @@ -24,7 +24,8 @@ const routes: Routes = [{ component: StandingPenaltyComponent }, { path: 'action/survey', - loadChildren: '@eg/staff/admin/local/survey/survey.module#SurveyModule' + loadChildren: () => + import('./survey/survey.module').then(m => m.SurveyModule) }, { path: ':schema/:table', component: BasicAdminPageComponent diff --git a/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts index a0df70e070..b94adf9099 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts @@ -3,21 +3,26 @@ import {RouterModule, Routes} from '@angular/router'; const routes: Routes = [{ path: '', - children : [ - { path: 'workstation', - loadChildren: '@eg/staff/admin/workstation/routing.module#AdminWsRoutingModule' + children : [{ + path: 'workstation', + loadChildren: () => + import('./workstation/routing.module').then(m => m.AdminWsRoutingModule) }, { path: 'server', - loadChildren: '@eg/staff/admin/server/admin-server.module#AdminServerModule' + loadChildren: () => + import('./server/admin-server.module').then(m => m.AdminServerModule) }, { path: 'local', - loadChildren: '@eg/staff/admin/local/admin-local.module#AdminLocalModule' + loadChildren: () => + import('./local/admin-local.module').then(m => m.AdminLocalModule) }, { path: 'acq', - loadChildren: '@eg/staff/admin/acq/admin-acq.module#AdminAcqModule' + loadChildren: () => + import('./acq/admin-acq.module').then(m => m.AdminAcqModule) }, { path: 'booking', - loadChildren: '@eg/staff/admin/booking/admin-booking.module#AdminBookingModule' + loadChildren: () => + import('./booking/admin-booking.module').then(m => m.AdminBookingModule) }] }]; diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts index ec37bc205d..194a979052 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts @@ -14,7 +14,8 @@ const routes: Routes = [{ component: OrgUnitTypeComponent }, { path: 'config/floating_group', - loadChildren: '@eg/staff/admin/server/floating-group/floating-group.module#FloatingGroupModule' + loadChildren: () => + import('./floating-group/floating-group.module').then(m => m.FloatingGroupModule) }, { path: 'config/print_template', component: PrintTemplateComponent @@ -23,7 +24,8 @@ const routes: Routes = [{ component: PermGroupTreeComponent }, { path: 'actor/org_unit', - loadChildren: '@eg/staff/admin/server/org-unit.module#OrgUnitModule' + loadChildren: () => + import('./org-unit.module').then(m => m.OrgUnitModule) }, { path: 'actor/org_unit_proximity_adjustment', component: BasicAdminPageComponent, diff --git a/Open-ILS/src/eg2/src/app/staff/admin/workstation/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/workstation/routing.module.ts index acdb9a1752..6996a85080 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/workstation/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/workstation/routing.module.ts @@ -3,7 +3,8 @@ import {RouterModule, Routes} from '@angular/router'; const routes: Routes = [{ path: 'workstations', - loadChildren: '@eg/staff/admin/workstation/workstations/workstations.module#ManageWorkstationsModule' + loadChildren: () => + import('./workstations/workstations.module').then(m => m.ManageWorkstationsModule) }]; @NgModule({ diff --git a/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts index 67fb59b56c..d4b2770d8a 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/routing.module.ts @@ -3,10 +3,12 @@ import {RouterModule, Routes} from '@angular/router'; const routes: Routes = [ { path: 'vandelay', - loadChildren: '@eg/staff/cat/vandelay/vandelay.module#VandelayModule' + loadChildren: () => + import('./vandelay/vandelay.module').then(m => m.VandelayModule) }, { path: 'authority', - loadChildren: '@eg/staff/cat/authority/authority.module#AuthorityModule' + loadChildren: () => + import('./authority/authority.module').then(m => m.AuthorityModule) } ]; diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/routing.module.ts index 9033f92642..c2b7432e99 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/routing.module.ts @@ -3,7 +3,8 @@ import {RouterModule, Routes} from '@angular/router'; const routes: Routes = [ { path: 'bcsearch', - loadChildren: '@eg/staff/circ/patron/bcsearch/bcsearch.module#BcSearchModule' + loadChildren: () => + import('./bcsearch/bcsearch.module').then(m => m.BcSearchModule) } ]; diff --git a/Open-ILS/src/eg2/src/app/staff/circ/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/circ/routing.module.ts index 2409977d1f..fae4330cb4 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/routing.module.ts @@ -3,7 +3,8 @@ import {RouterModule, Routes} from '@angular/router'; const routes: Routes = [ { path: 'patron', - loadChildren: '@eg/staff/circ/patron/routing.module#CircPatronRoutingModule' + loadChildren: () => + import('./patron/routing.module').then(m => m.CircPatronRoutingModule) } ]; diff --git a/Open-ILS/src/eg2/src/app/staff/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/routing.module.ts index e390a3db4d..16c21c911f 100644 --- a/Open-ILS/src/eg2/src/app/staff/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/routing.module.ts @@ -20,7 +20,8 @@ const routes: Routes = [{ pathMatch: 'full', }, { path: 'booking', - loadChildren : '@eg/staff/booking/booking.module#BookingModule' + loadChildren: () => + import('./booking/booking.module').then(m => m.BookingModule) }, { path: 'about', component: AboutComponent @@ -32,19 +33,24 @@ const routes: Routes = [{ component: StaffSplashComponent }, { path: 'circ', - loadChildren : '@eg/staff/circ/routing.module#CircRoutingModule' + loadChildren: () => + import('./circ/routing.module').then(m => m.CircRoutingModule) }, { path: 'cat', - loadChildren : '@eg/staff/cat/routing.module#CatRoutingModule' + loadChildren: () => + import('./cat/routing.module').then(m => m.CatRoutingModule) }, { path: 'catalog', - loadChildren : '@eg/staff/catalog/catalog.module#CatalogModule' + loadChildren: () => + import('./catalog/catalog.module').then(m => m.CatalogModule) }, { path: 'sandbox', - loadChildren : '@eg/staff/sandbox/sandbox.module#SandboxModule' + loadChildren: () => + import('./sandbox/sandbox.module').then(m => m.SandboxModule) }, { path: 'admin', - loadChildren : '@eg/staff/admin/routing.module#AdminRoutingModule' + loadChildren: () => + import('./admin/routing.module').then(m => m.AdminRoutingModule) }] }]; diff --git a/Open-ILS/src/eg2/tsconfig.json b/Open-ILS/src/eg2/tsconfig.json index e50f1d4908..803f251ea8 100644 --- a/Open-ILS/src/eg2/tsconfig.json +++ b/Open-ILS/src/eg2/tsconfig.json @@ -4,7 +4,7 @@ "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, - "module": "es6", + "module": "esnext", "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, -- 2.43.2