In the following code,i am using [disabled] for disabling the name field whenever the operation is edit,however its not working. It does work if i change it to [readonly]="operationType == 'Edit'"...can anyone help me why disabled is not working? thank you.
<mat-form-field style="width: 320px !important;background-color: white;" appearance="outline">
<mat-label>NAME</mat-label>
<input matInput type="text" style="text-transform: uppercase;" maxlength="6"
formControlName="name"
oninput="this.value = this.value.toUpperCase()"
[disabled]="operationType == 'Edit'" />
<mat-error *ngIf="hasError('name', 'required')">name is required</mat-error>
</mat-form-field>