I'm trying to disable a reactive input form control in angualr2 as disabled based on a variable "canDisable" from the component. My code looks something like this.
<input type="text" formControlName="CustomerName" Name="CustomerName"
[disabled]="canDisable"/>
Unfortunately, it is not working as expected can anyone provide me the reason for it.
However, it is working fine If I do [attr.disabled]="canDisable".
<input type="text" formControlName="CustomerName" Name="CustomerName"
[attr.disabled]="canDisable"/>