Topic: MdbCheckbox: Expression Has Changed After It Was Checked
cloudscale premium asked 3 years ago
Simple example of mdb-checkbox:Checked with ngModel
<form> <mdb-checkbox [(ngModel)]="templateChecked" name="templateChecked">Checked with ngModel</mdb-checkbox> </form>
Uncaught Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'value: null'. Current value: 'value: undefined'.
You cannot call mdb-checkbox without wrapping it in a FORM tag. This makes no sense, as [(ngModel)] does not require a FORM tag. Is this something that can be handled by mdb-checkbox?
Yes, forms module is imported. We are using 8.10.1.
Dropping the mdb-checkbox with ngmodel on a blank component with nothing else still causes this issue. If I set a value in the component, I still get an error. It seems to set the value from null to undefined, or null to SomeValue. Doesn't matter. Both ways fail.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Premium
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: 8.10.1
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No