title: Show and Enable When Checkbox Have A Check in Angular/Ionic
body: <p>i need to enable and show the formControlName="plane_input" IF the formControlName="plane_checkbox" has a check on it. How would i do this using Angular/Ionic? Please help. Thanks.</p>
  
  <pre><code>ngOnInit(){
      this.form.get('plane_checkbox').valueChanges.subscribe(
  
      (plane: any) =&gt; {
  
          if (plane === true) {
  
               this.form.controls.plane_input.enable();
  
          } else if (plane !== true) {
  
               this.form.controls.plane_input.disable();
          }
  
          this.form.get('plane_input').updateValueAndValidity();
  
      });
  
    }
  
    initializeForm() {
      this.form = this.fb.group({
        plane_checkbox: [false],
        plane_input:  new FormControl({value: '', disabled: true}),
      });
    }
  </code></pre>
  
  <blockquote>
  <pre><code>html
  </code></pre>
  </blockquote>
  
  <pre><code>&lt;ion-item&gt;
      &lt;ion-label&gt;Do you have a Plane&lt;/ion-label&gt;
      &lt;ion-checkbox formControlName="plane_checkbox" [checked]="plane_checkbox"&gt;&lt;/ion-checkbox&gt;
  &lt;/ion-item&gt;
  
  &lt;ion-item&gt;
      &lt;ion-label&gt;Plane Details&lt;/ion-label&gt;
      &lt;ion-input type="text" formControlName="plane_input"&gt;&lt;/ion-input&gt;
  &lt;/ion-item&gt;
  </code></pre>