We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
Could you try it on stackblitz as well? https://stackblitz.com/edit/ngx-order-pipe?embed=1&file=app/app.component.ts
Sorry, something went wrong.
@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
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: