I am currently working on a dynamic carousel that should display multiple cards or images in one row. Initially, I faced an issue with the next and previous buttons not functioning properly when trying to display multiple cards in one row. After some online research, I managed to fix the button functionality, but now I am only able to see one image in each slide. Here is the code snippet I am using:
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item" *ngFor="let data of dummyData; let i = index"
[ngClass]="{'active' : i == 0}">
<div class="row">
<div class="col">
<div class="main-card">
<span class="mt-4">
{{data.class}} <br>
{{data.when}}
</span>
</div>
</div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
Current design with one card per row
This is what my current layout looks like.
Desired design for multiple cards per row
If anyone can point out where I may have gone wrong, I would greatly appreciate it. Thank you!