I'm trying to define a particular layout to render a list of objects.
I'm using angular and bootstrap and I would like to use a for loop (ngFor) to cycle through the list.
Each row of the table should have three elements.
This is how it should look like (indexes of the array inside the grid):
|-------------|-------------|-------------|
| 0 | 1 | 2 |
|-------------|-------------|-------------|
| 3 | 4 | 5 |
|-------------|-------------|-------------|
[...]
|-------------|-------------|-------------|
| n-1 | n | empty |
|-------------|-------------|-------------|
I know I can combine bootstrap row and bootstrap col to divide the array in three elements per line.
But I would like to know if there is a way to render the 4th element (and the 7th and so on) in a new line without using the bootstrap row.
I mean, is there a way to define the width of the container of the list so that when its width is fulfilled the next element goes in a new line?
This would substantially simplify the structure of the for loop.