Answer the question
In order to leave comments, you need to log in
Why doesn't disabled for formGroup work?
this.form = this.formBuilder.group({
cadnum: [{ value: this.application?.cadnum, disabled: true }],
});
<mat-form-field>
<input matInput formControlName="cadnum" />
</mat-form-field>
Answer the question
In order to leave comments, you need to log in
You can do it like this:
this.form = this.formBuilder.group({
cadnum: this.application?.cadnum,
});
setTimeout((): void => {
this.form.controls.cadnum.disable();
}, 0);
<input matInput formControlName=“cadnum” [disabled]=“disable”>
this.form = this.formBuilder.group({
cadnum: this.application?.cadnum,
});
this.disable = true;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question