How can I skip the first index from the array?
<li *ngFor="#user of users">
{{ user.name }} is {{ user.age }} years old.
</li>
You could use the slice pipe.
<li *ngFor="#user of users | slice:1">
{{ user.name }} is {{ user.age }} years old.
</li>
The first parameter corresponds to a positive integer representing the start index.
There is the SlicePipe for this use case:
<li *ngFor="let user of users | slice:1">
{{ user.name }} is {{ user.age }} years old.
</li>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With