I am looking to dynamically generate rows in an angular template, with each row containing 4 columns. For example, if the input is 40, the output should have 10 rows, each consisting of 4 columns. I am using bootstrap for my template layout. Below is what I have tried so far, but it's not working as expected.
<div class="row" *ngFor="let r of row">
<div class="col-3" *ngFor="let i of id">{{i}}</div>
</div>
Here is the corresponding .ts code:
id: number = 40;
row: number = id / 4;
I am facing a challenge similar to dealing with matrices, but how can I achieve this in the template?