I am trying to display two columns within a row in my ionic/angular project. the its just creating a stack where the other content is in the bottom.
this is also my css
<ion-grid class="rewards-container" *ngIf="!noRewardsData">
<ion-row class="row-container">
<ng-container *ngFor="let category of categories">
<ion-col size="6" class="reward-item" *ngIf="contentVisibility[category.value] && getRewardsByCategory(category.value).length > 0">
<ion-card class="reward-card" *ngFor="let item of getRewardsByCategory(category.value); let i = index" (click)="selectedReward(item)">
<div>
<img class="reward-image" [src]="item.imageUrl" (error)="$event.target.src = defaultImg">
</div>
<div class="reward-details">
<div class="reward-name">{{item.name}}</div>
<div class="reward-cost">{{item.points}}</div>
</div>
</ion-card>
</ion-col>
</ng-container>
</ion-row>
</ion-grid>
2
Answers
I am unable to replicate the issue since you have not shared all the code needed, please find below working example for your reference!
html
ts
stackblitz
Copy and paste your code into the Code sample pre code area when you click on the {} button.
You can use "unminify" site to indent the code.
https://unminify.com
The Tab size would be 1. Paste your code there and click on the Unminify button.
Now use the Copy button then paste at the stackoverflow into the Code sample pre code area when you click on the {} button.