Home ng-options not sorting angular+ionic select
Reply: 0

ng-options not sorting angular+ionic select

Joe Scotto
1#
Joe Scotto Published in 2017-12-07 15:53:34Z

I'm tryingto get my dropdown select sorted by alphabetical order and currently have this code:

<ion-select [(ngModel)]="schoolModel" (ngModelChange)="schoolSelected($event)" interface="popover" placeholder="All Schools"
  ng-options="s.title for s in sportConfig.schools | orderBy:'title'">
  <ion-option [value]="null" selected>All Schools</ion-option>
  <ion-option *ngFor="let school of sportConfig.schools" [value]="school">{{school.title}}</ion-option>
</ion-select>

What would be causing this to not sort? What am I missing?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.322152 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO