Fix Angular 21 compatibility by removing invalid [config] binding from modal components #988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The Docker build was failing with Angular compilation error:
This error occurred in three modal component templates where
[config]="{ignoreBackdropClick: true}"was being used as a property binding on<div>elements.Root Cause
In Angular 21, the
[config]property binding syntax on a<div>element is not valid. The configuration object was attempting to be bound to a standard HTML div element, which doesn't recognize this as a valid property or directive input in the updated Angular/MDB Bootstrap framework.Solution
Removed the invalid
[config]="{ignoreBackdropClick: true}"binding from all three modal component templates:Before:
After:
Files Changed
eform-client/src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.htmleform-client/src/app/plugins/modules/customers-pn/components/customer-pn-edit/customer-pn-edit.component.htmleform-client/src/app/plugins/modules/customers-pn/components/customer-pn-delete/customer-pn-delete.component.htmlImpact
mdbModaldirective handles modal behavior correctly without the config bindingFixes #[issue_number]
Original prompt
This section details on the original issue you should resolve
<issue_title>Update angular code to conform to angular 21 as eform-angular-frontend</issue_title>
<issue_description>Doing docker build, we get these errors:
#23 27.89 ✘ [ERROR] NG8002: Can't bind to 'config' since it isn't a known property of 'div'. [plugin angular-compiler]
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.html:1:5:
#23 27.89 1 │ <div [config]="{ignoreBackdropClick: true}" mdbModal class="modal f...
#23 27.89 ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 27.89
#23 27.89 Error occurs in the template of component CustomerPnAddComponent.
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts:8:15:
#23 27.89 8 │ templateUrl: './customer-pn-add.component.html',
#23 27.89 ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 27.89
#23 27.89
#23 27.89 ✘ [ERROR] NG8003: No directive found with exportAs 'mdbModal'. [plugin angular-compiler]
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.html:1:80:
#23 27.89 1 │ ...ackdropClick: true}" mdbModal class="modal fade" #frame="mdbModal">
#23 27.89 ╵ ~~~~~~~~
#23 27.89
#23 27.89 Error occurs in the template of component CustomerPnAddComponent.
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts:8:15:
#23 27.89 8 │ templateUrl: './customer-pn-add.component.html',
#23 27.89 ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 27.89
#23 27.89
#23 27.89 ✘ [ERROR] NG8004: No pipe found with name 'translate'. [plugin angular-compiler]
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.html:5:32:
#23 27.89 5 │
{{ 'New Customer' | translate }}
#23 27.89 ╵ ~~~~~~~~~
#23 27.89
#23 27.89 Error occurs in the template of component CustomerPnAddComponent.
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.ts:8:15:
#23 27.89 8 │ templateUrl: './customer-pn-add.component.html',
#23 27.89 ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 27.89
#23 27.89
#23 27.89 ✘ [ERROR] NG8003: No directive found with exportAs 'ngForm'. [plugin angular-compiler]
#23 27.89
#23 27.89 src/app/plugins/modules/customers-pn/components/customer-pn-add/customer-pn-add.component.html:12:29:
#23 27.89 12 │ <form #createForm="ngForm">
#23 27.89 ╵ ~~~~~~
#23 27.89
#23 27.89 Error occurs in the template of component CustomerPnAddComponent.
#23 27.89
microting/eform-angular-...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.