In Angular, from a list of items I need to show n elements in a row.
I have pasted the code from Angular on what I tried but not able to repeat the <tr>
tags.
<table class="table table-bordered table-striped mb-0 table-hover">
<tbody *ngFor="let tableColObj of LWTableColumnNames.refLWTableColumnNames; let i=index">
<tr>
<td *ngIf="tableColObj.SelectionFlag == true">{{tableColObj.COLUMN_NAME}}</td>
</tr>
</tbody>
</table>
List - [e1,e2,e3,e4,e5,e6]
<table>
<tr>
<td>e1</td>
<td>e2</td>
<td>e3</td>
</tr>
<tr>
<td>e4</td>
<td>e5</td>
<td>e6</td>
</tr>
</table>
Copyright Notice:Content Author:「Shafeeq Mohammed」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/56782801/how-to-show-three-elements-in-a-row-while-iterating-through-a-list-of-elements-i