How to disable ionic form field depending on other form field values?


#1

there is one ion select

 <ion-select formControlName="window_exists"  (ionChange)="openWindow()" type="text">  
        <ion-option value="Y">Yes</ion-option>
          <ion-option value="N">No</ion-option>
        </ion-select>

i want to disable ion input if ion-option value is “NO”

 <ion-input   type="number" min="0" formControlName="ml_window_no" required clearInput></ion-input>

#2
<ion-input [disabled]="form.get('window_exists').value === 'N'">