Ionic 2 Adding form fields dynamically
<p>I'm looking to add input field dynamically, is it possible? someone has example how to do that?
For example when i choose from my select options 2 input field it shows me and one i choose 5 input fields it shows me 5 input fields</p>

<p>I thought to do something like that</p>

<pre><code> &lt;ion-item&gt;
    &lt;ion-label fixed&gt;Field 1&lt;/ion-label&gt;
    &lt;ion-input type="text" value=""&gt;&lt;/ion-input&gt;
  &lt;/ion-item&gt;

  &lt;ion-item *ngIf="someVariable === 'value1'"&gt;
    &lt;ion-label fixed&gt;Field 2&lt;/ion-label&gt;
    &lt;ion-input type="text" value=""&gt;&lt;/ion-input&gt;
  &lt;/ion-item&gt;

&lt;/ion-list&gt;
Then i bind select to someVariable:

&lt;ion-item&gt;
  &lt;ion-label&gt;Options&lt;/ion-label&gt;
  &lt;ion-select [(ngModel)]="someVariable"&gt;
    &lt;ion-option value="value1" selected="true"&gt;Option 1&lt;/ion-option&gt;
    &lt;ion-option value="value2"&gt;Option 2&lt;/ion-option&gt;
  &lt;/ion-select&gt;
&lt;/ion-item&gt;
</code></pre>

<p>that's good but let's suppose i have 8 options and if user choose option 5 so it shows his 5 input fields, how can i do that?
in addition if i do that, i need to declare variables dynamically because option 5 value i need to assign to specific variable.</p>