I have successfully sorted an Array in ascending order, but now I am struggling to figure out how to implement sorting in descending order using ngx-order-pipe
.
$ npm install ngx-order-pipe --save
TS
dummyData: any[] = [ { name: 'G' }, { name: 'B' }, { name: 'Z' }, { name: 'A' }, { name: 'H' } ];
HTML
<div *ngFor="let item of (dummyData | orderBy:'name') "> <p>{{item.name}}<p> </div>
Does anyone have suggestions on how to achieve sorting in descending order?