Ion-select default value


#1

Hey guys,

Is it possible to display a default value on the ion-select component? I haven’t been able to find anything on it and the lack of a decent dropbox means i’d like to try make this look like one atleast. Also how would I get my text to fill the whole box?

    <ion-item>
      <ion-select [(ngModel)]="pickupLocation">
        <ion-option value="stuttgart">Pickup location Stuttgart</ion-option>
        <ion-option value="hamburg">Pickup location Hamburg</ion-option>
      </ion-select>
    </ion-item>

What it currently looks like:


#2

The default value will be whatever is selected currently: IOW, whatever pickupLocation contains.


#3

It contains nothign when the page loads. Thats why I ask the question.


#4

So make it contain something.