javascript - angular2 - skip first item in ngFor -


i want skip first item ngfor:

<li *ngfor="#m +1 of [1,2,3,4]">{{m}}</li> 

the output should be: 2,3,4

what best way in angular2?

you can start second (or arbitrary offset) items of collection of slice pipe:

<div *ngfor="#m of [1,2,3] | slice:1">{{ m }}</div> // print 2 , 3 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -