<li *ngFor="#user of users "> {{ user.name }} is {{ user.age }} years old. </li>
Is it possible to invert the ngFor that the items are added bottom up?
You can simply use JavaScript's .reverse() on the array. Don't need an angular specific solution.
.reverse()
<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
1.4m articles
1.4m replys
5 comments
57.0k users