Invert Angular 2 *ngFor

You can simply use JavaScript’s .reverse() on the array. Don’t need an angular specific solution.

<li *ngFor="#user of users.slice().reverse() ">
   {{ user.name }} is {{ user.age }} years old.
</li>

See more here:
https://www.w3schools.com/jsref/jsref_reverse.asp

Leave a Comment