Ionic multi-line ion-option


#1

I’m trying to create an ion-select with ion-options that contain multiple lines but the framework seems to strip out any html elements added into the option. Any way around this?

<ion-select>
<ion-option>
test<br/>test
</ion-option>
</ion-select>

#2

try to use p tag into your test


#3

did you find the solution?


#4

No, not exactly. I had to settle for using a radio list and wound up with this:

<ion-list radio-group formControlName="selection">
      <ion-list-header>
        Options
      </ion-list-header>
      <ion-item *ngFor="let option of options">
        <ion-label>
             <div>{{option.name}}</div>
             <div>{{option.description}}</div>
        </ion-label>
        <ion-radio checked="true" [value]="option.id"></ion-radio>
      </ion-item>
</ion-list>