There are 2 possible answers to the question, depending on what was actually asked.
If the goal is to skip the first element of the array, then the answers including the slice are in the right direction.
However, if the goal is to simply shift the index while continuing to iterate over the entire array, then slicing is NOT the right approach, since it will skip the 0th element in the array, thereby only removing n-1 elements from the array of length n .
@Taylor gave a real example of when an index may need an offset for display purposes, for example, when listing, where the first record should read 1, not 0.
Here is another similar example:
<li *ngFor="let book of books; let i = index"> {{ i + 1 }}. {{ book.title }} </li>
which will produce a conclusion like:
Sample book title
Another title of the book
...
source share