【发布时间】:2022-01-02 07:04:31
【问题描述】:
我在 <ion-select-option *ngFor="let item of collection | myPipe:someValueToFilter" [value]="item"> 上使用管道转换,管道将执行一些过滤、映射和排序。
如何在管道转换后的转换集合中将默认值设置为<ion-select [(ngModel)]="selectedItem"> 内的selectedItem? (假设转换后的集合中的第一项)
【问题讨论】:
-
你能提供你的代码吗?
-
@MohammadBabaei 我编辑了一些 html 代码,关于管道,它只是做一些普通的过滤、映射和排序
标签: angular ionic-framework pipe ngfor ion-select