I have ionic 4 app and want to sort(both ascendin and descending order based on price) ion list tems when user click on sort icon…is there any way that I can do it from front end or do I need to again call my service api to sort the data and render it again on UI?
Show your code. You only attach your variable with an *ngFor. On click of a button, you sort the content inside the variable holding it. This way, your content gets refreshed automatically since it’s binded.
Hi , Can you brief it… Below is my code…there are two icons added to enable user to perform ascending and descending order… What should I write in .ts file for sortAsc() and sortDesc()
<ion-list *ngIf=“list?.length!==0”>
<ion-item *ngFor=“let data of list” (click)=“geToDetail(data)”>