#make mat select un editable dynamically in angular 15

5 messages · Page 1 of 1 (latest)

craggy isle
#

@lucid kelp - I wanna control disabled with property binding, angular removed that in 15 , I'm now enabling and disabling in ts, but disabled control values are null when submitting form. I wanna, disabled so control cannot be editable under certain condition. Thanks jn advance

lost bronze
#

You can access the value of a form control even if it's disabled, using formControl.value. The value is not part of its parent form group's value though. Unless you call formGroup.getRawValue().

craggy isle
#

@lost bronze -so I have to use getrawvalue() instead of value while submitting form?

lost bronze
#

Or get the value of your disabled control directly from your control.

craggy isle
#

@lost bronze -thank you sir, is there some way I can learn how angular works under the hood? Video tutorials would be helpful. Angular docs are not help ful, they don't have examples