I am trying to prompt a user to fill out a form (just name, grade and age) for each number of guest they want. I first ask them how many guests they want. Then on the next page I want to display that many forms to the user.
Like this:
<ion-list *ngFor="let item of numberOfGuests">
<ion-item>
<ion-label>Full name</ion-label>
<ion-input type="text"></ion-input>
</ion-item>
<ion-item>
<ion-label>Age</ion-label>
<ion-input type="number"></ion-input>
</ion-item>
<ion-item>
<ion-label>Grade</ion-label>
<ion-input type="number"></ion-input>
</ion-item>
</ion-list>
The above obviously does not work. I am just using that as an example. I want each list or form of inputs to be created based on how many guests the user wants to bring.
Is this even possible within Angular 2? Is it possible to dynamically create a form in html based on a numeral?