In my quest to create a dynamic list of items using the Angular directive *ngFor
, I have come up with the following structure:
Text - Image
Image-Text
Text - Image
Image-Text
https://i.sstatic.net/QgLdr.png
<ion-grid>
<ion-row *ngFor="let item of items">
<ion-col col-6 ">
<ion-card ">
<ion-card-content>{{item.name}}
</ion-card-content>
</ion-card>
</ion-col>
<ion-col col-6 >
<ion-card>
<img [src]="item.img"/>
</ion-card>
</ion-col>
</ion-row>
</ion-grid>
As excited as I am about this setup, I'm facing some doubts on how to implement it effectively in a loop. Any thoughts or suggestions would be greatly appreciated. Thank you!