title: Set Value to a dynamically created Ion-Input
body: <p>I have a dynamically created Ion-Input control.</p>
  
  <p>Below that there is a button on click on that button i will open the scanner and read the bar code. I want this bar code to appear on the Ion-Input that i created dynamically.</p>
  
  <pre><code>&lt;input *ngSwitchCase="'textbox'" [formControlName]="question.key"
          [id]="question.key" [type]="question.type"&gt;
  
  &lt;button type="button" ion-button (click)="Scan"&gt;&lt;/button&gt;
  
  Scan(){
   return barcodeasString;
  }
  </code></pre>
  
  <p>I want the barcode to appear on the ion-input. I tried to pass the this object and question object and set its value but it didnt work.</p>
  
  <p>Any hints would be helpful!!</p>
  
  <p><a href="https://plnkr.co/edit/ZmzmANTP3bpFmSX7lle0?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/ZmzmANTP3bpFmSX7lle0?p=preview</a></p>