Adding an ion card [SOLVED]

Hello,

I customize an ion-card, this ion-card has some fields to be filled by the user. In my page I have a button to add a card. I want each time the user click the button, a card will be add it to the list.

There is anyone can help me with that.

Thanks in advance

Why don’t you post some of the code you have tried so far?

// This is the ion-card that I have. And I want to generate the same one when the user click the add button.
// I didn’t write any .ts code. And notice that I have the card and the button in the same page. But I think that I have to put the card in a separate component and add it to the list when I click on the add button.
// I didn’t write any .ts code. And notice that I have the card and the button in the same page. But I think that I have to put the card in a separate component and add it to the list when I click on the add button.

Date:
<ion-item>
  <ion-label>Time:</ion-label>
  <ion-datetime displayFormat="HH:mm"  [(ngModel)]="myTime"></ion-datetime>
</ion-item>

<ion-item>
  <ion-label> BGL: </ion-label>
  <ion-input type="number" value="" placeholder="Enter you BGL mg/dL "></ion-input>  
</ion-item>

// this is the add button.
Save

Well, if you’re basically asking the forum to do your job for you, I think I’ll suggest taking a look at the Hall of Heroes, especially the part about ngFor. Good luck.

Thank you anyway, But I’m not asking the forum to do the job for me (That why I didn’t post any code in the first place). But I’m asking the forum to tell me where should I look or start.

To re-iterate what rapropos said, you should look into using ngFor to accomplish what you want.