I have an array called carsList
with 5 values. I am trying to slice it 2 by 2.
<table>
<tr *ngFor="#item of carsList | slice:0:2; #i = index">
<td>{{i}}. {{item}}</td>
</tr>
</table>
The code above is only slicing 2 values at a time, but I actually want to slice 2 by 2.
Example
0 1
2 3
4 5
Here is the link to my code for reference:
https://plnkr.co/edit/BZnaSIldgO3Dmwao1mo6?p=preview
If you could please help me find where my mistake is, I would greatly appreciate it.