Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70764

Sorting ion-items alphabetically with different languages

$
0
0

@cmelone wrote:

Hi there, I am creating an app where a user sees a list that needs to be sorted alphabetically. The app is offered in two languages, so the translate pipe needs to be integrated into it in some way.

This is my current code:

<ion-list>
  <ion-item *ngFor="let f of foods">
    <p>{{ f.name | translate }}</p>
  </ion-item>
</ion-list>

Is there any way I can sort them alphabetically (using f.name) in both languages using a pipe or something similar?

Let me know if I need to clarify anything.

Thank you.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>