Onload itself textboxes are disabled mode, if we select checkbox, textboxes should be enabled and uncheck textboxes should be disabled mode and no error borders. I tried below code, validations are working fine but unable to disable/enable checkboxes, please help me the issue..
<input type="checkbox" #chkEnable ngModel />
<label>CheckBox Select to Enable/Disable</label>
<div class="form-group">
<label>First Name</label>
<input type="text" [disabled]="!chkEnable.checked" formControlName="firstName" class="form-control" [ngClass]="{ 'is-invalid': ( f.firstName.touched) && f.firstName.errors }" />
<div *ngIf="((f.firstName.touched) && f.firstName.errors)" class="invalid-input"></div>
</div>