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

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -