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
More Related Contents:
- How to add bootstrap to an angular-cli project
- How to add CORS request in header in Angular 5
- No provider for AngularFireDatabase, AngularFireAuth
- Is there a way to remove unused imports and declarations from Angular 2+? [closed]
- TS2531: Object is possibly ‘null’
- ng2 – dynamically creating a component based on a template
- angular-i18n work-around for translations in code?
- Get access to FormControl from the custom form component in Angular
- How do I navigate to a sibling route?
- Trigger update of component view from service – No Provider for ChangeDetectorRef
- TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable
- Type casting within a template in Angular 2
- How to Using a FormArray in a FormGroup
- How to execute only one test spec with angular-cli
- Class is using Angular features but is not decorated. Please add an explicit Angular decorator
- How to validate white spaces/empty spaces? [Angular 2]
- Angular 4 Material table highlight a row
- Style html,body from web component (Angular 2)
- How to create variable in ngFor loop?
- Angular Mat Select Multiple selectionchange finding which option was changed
- Call a function every 10 seconds Angular2
- How to change angular material datepicker format
- Angular 4: “Cannot find name ‘require’
- Angular2 Routing – keeping state of component when route changes [duplicate]
- How to make a post request with angular 5
- How to send 1000 XHTTP Requests with maximum number of parallel requests
- Does Angular2 use Web Components?
- Angular2 Error: There is no directive with “exportAs” set to “ngForm”
- `[(ngModel)]` vs `[(value)]`
- Angular Material2 theming – how to set app background?