LP1857910 Field doc UI Angular 10 updates
authorBill Erickson <berickxx@gmail.com>
Mon, 17 Aug 2020 21:29:50 +0000 (17:29 -0400)
committerJane Sandberg <js7389@princeton.edu>
Fri, 20 May 2022 00:16:46 +0000 (18:16 -0600)
Modify the lazy loader to use the new Ang10 style loading syntax.

Avoid using template variables as output variables for other components,
since template variables (those declared with let-foo="bar" in
<ng-template/>) are read-only, possibly as of Ang 10, so the page was
not loading at first.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/routing.module.ts

index 481a681..c6ee7bb 100644 (file)
@@ -33,7 +33,7 @@
 </eg-fm-record-editor>
 
 <ng-template #fieldClassSelector let-fieldentries="fieldentries" let-selected="selectedEntry">
-  <eg-combobox [allowFreeText]="true" [(ngModel)]="selected" required="true"
+  <eg-combobox [allowFreeText]="true" [ngModel]="selected" required="true"
     [entries]="fieldentries" (onChange)="setClass($event)">
   </eg-combobox>
 </ng-template>
@@ -41,7 +41,7 @@
 <ng-template #fieldSelector
   let-entries="fields" let-selected="selectedEntry">
   <eg-combobox [allowFreeText]="true" required="true"
-    [entries]="fields" [(ngModel)]="selected"
+    [entries]="fields" [ngModel]="selected"
     (ngModelChange)="setField($event)">
   </eg-combobox>
 </ng-template>
@@ -49,4 +49,4 @@
 <eg-string #updateSuccessString text="Updated succeeded!" i18n-text></eg-string>
 <eg-string #updateFailedString text="Updated failed." i18n-text></eg-string>
 <eg-string #createSuccessString text="New Field Documentation Created!" i18n-text></eg-string>
-<eg-string #createFailedString text="Creation of new Field Documentation failed." i18n-text></eg-string>
\ No newline at end of file
+<eg-string #createFailedString text="Creation of new Field Documentation failed." i18n-text></eg-string>
index f3ff4e8..e619f6e 100644 (file)
@@ -67,7 +67,8 @@ const routes: Routes = [{
       import('./triggers/triggers.module').then(m => m.TriggersModule)
 }, {
     path: 'config/idl_field_doc',
-    loadChildren: '@eg/staff/admin/local/field-documentation/field-documentation.module#FieldDocumentationModule'
+    loadChildren: () => import('./field-documentation/field-documentation.module')
+      .then(m => m.FieldDocumentationModule)
 }, {
     path: ':schema/:table',
     component: BasicAdminPageComponent