Ion select subtitle


I have an ion select, I want to show a subtitle that can be changed when there is no option to be selected.

This is my html code:

    <ion-select [(ngModel)]="selEquipoHis" (ionChange)="doSelect()">
      <ion-option *ngFor="let i of equipos" value="{{ i.Address }}">{{ i.Alias }}</ion-option>

If array equipos has elements I want to show a subtitle for example: “Choose a device”, but if equipos has no elements change the subtitle to “No devices ready”. My actual code shows an empty list of options with a title Equipo and OK and Cancel buttons.

Any guidance?

Thank you.

I want to know how to add the subtitle just like the following example from Ionic API:



1 Like

Ok done, using selectOptions


<ion-select [selectOptions]="selectOptions" [(ngModel)]="selEquipoHis" (ionChange)="doSelect()">


   this.selectOptions = {
    title: 'Aviso',
    subTitle: 'Equipos no disponibles'        
1 Like