我有以下内容:
<div>
<ul>
<li *ngFor="let item of array | orderBy: 'type'">
{{ item.type | translate }}
</li>
</ul>
</div>
i18n translation是在li块内制作的。然后,无论翻译是什么,orderBy管道都不关心对数组进行排序的语言。
如何以特定语言订购?
- 做类似的事情:
let item of array | translate: 'type' | orderBy: 'type' - 用
translate管子进orderBy管子 - 翻译控制器中的数组,然后使用
orderBy排序