Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to add icon to label at alert box

$
0
0

@rsa wrote:

I want to add Icon to lable <ion-icon name="star-outline"></ion-icon>

let prompt = this.alertController.create();
    prompt.setTitle('rating');
    prompt.setMessage(text);

    prompt.addInput({
      type: 'radio',
      label: '1 `<ion-icon name="star-outline"></ion-icon>',
      value: '1'
    });
    prompt.addInput({
      type: 'radio',
      label: '2',
      value: '2'
    });
    prompt.addInput({
      type: 'radio',
      label: '3',
      value: '3'
    });
    prompt.addInput({
      type: 'radio',
      label: '4',
      value: '4'
    });

    prompt.addButton({
      text: 'Cancel',
      handler: data => {
        console.log('Cancel clicked');
      }
    });
    prompt.addButton({
      text: 'Save',
      handler: data => {
        console.log('Radio data:', data);
        this.testRadioOpen = false;
        this.testRadioResult = data;
      }
    });

but it was not working and showing tag content. how can I solve it?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>