I have the following:
<div>
<ul>
<li *ngFor="let item of array | orderBy: 'type'">
{{ item.type | translate }}
</li>
</ul>
</div>
The i18n translation is made inside the li block. Then, no matter what the translation is, the orderBy pipe does not care of the language to sort the array.
How can I order in the specific language?
- do something like:
let item of array | translate: 'type' | orderBy: 'type' - use the
translatepipe into theorderBypipe - translate the array in the controller and then use the
orderBysort