I'm trying to make a grid where 3 cards are displayed in one line, then a new row is added, and the next 3 cards are displayed.
This is the code I have at the moment:
<div class="container">
<div *ngIf="recipes$ | async as recipes; else loadingOrError">
<div class="row">
<div class="col" *ngFor="let recipe of recipes; let i = index">
<app-recipe [recipe]="recipe"></app-recipe>
<div *ngIf="i % 3 === 0">
<div class="row"></div>
</div>
</div>
</div>
<ng-template #loadingOrError></ng-template>
</div>
</div>
This does not work. Is there an easier way to complete this task? I'm using the mdbootstrap framework.