Closed juliosardella closed 4 years ago
Could you try it on stackblitz as well? https://stackblitz.com/edit/ngx-order-pipe?embed=1&file=app/app.component.ts
@juliosardella I tried with your method. It is working fine. Can you post the 'users' object?
Hello my friends, i'm sorry for wasting your time. My problem was solved by changing the 'order' field from private to public. Thanks
Hi, i can't use a custom comparator method. The values are going undefined:
html: <tr *ngFor="let user of users | orderBy: 'order':false:'case-insensitive':customComparator">
ts: customComparator(itemA, itemB) { console.log("itemA:" + itemA); console.log("itemB:" + itemB); return itemA > itemB ? 1 : -1; }
result in console (in loop): itemA:undefined itemB:undefined
I'm doing something wrong? My main objective is to order custom date field.
Thanks