I'm using pipe transform on <ion-select-option *ngFor="let item of collection | myPipe:someValueToFilter" [value]="item"> and the pipe will do some filter, map and sort.
How can I set default value to selectedItem within <ion-select [(ngModel)]="selectedItem"> in transformed collection after pipe transforming? (Let's say the first item in transformed collection)
I think you can use your pipe in
component.tsfile instead of the template like this:then in your method or
ngOnInithook use your pipe to filter your data and use its value where you want, for example, set to the selected item.