title: Ionic - Can't get value of ion-input when there is *ngIf in tag <form>
body: <p>I'm building an hybrid app using Ionic 3 and Angular, and I'm stuck on this:</p>
  
  <p>I have a form and I only want it to appear depending on a condition in controller.</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>export class ClassName implements OnInit{
    private show: boolean = false;
  
    ngOnInit(){
      if(someCondition){
        this.show = true;
      }
    }
  }
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;ion-content&gt;
  &lt;button ion-button small block full color="danger" (click)="sum(discount.value)"&gt;Cancelar&lt;/button&gt;
  
      &lt;form *ngIf="show"&gt;  
        &lt;ion-list&gt;
          &lt;ion-item&gt;
              &lt;ion-label  floating&gt;Discount ($)&lt;/ion-label&gt;
              &lt;ion-input  #discount type="number"&gt;&lt;/ion-input&gt;
            &lt;/ion-item&gt;
        &lt;/ion-list&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>The problem is</strong> that when the variable show's value is true (the form is visible/showing) and when I click the button, nothing happens, no errors either. But when I remove the *ngIf="show" from tag , then the click button calls the function correctly.</p>
  
  <p>I don't know what the problem is and I don't want just to hide the form using something like [hidden], I don't want it to be created if the condition is false.</p>
  
  <p>Could it be some kind of binding problem? </p>
  
  <p>I already tried to put the condition in the ionViewWIllEnter(), but nothing changes..</p>
  
  <p>I need help.</p>