AlertController: possibility to add <ion-icon> in message parameter
See original GitHub issueWhen createing an AlertController object:
let alert = this.alertController.create({
title: "My title",
message: 'Some message'
});
it would be great if we could add an ion-icon in the message, like this:
let alert = this.alertCtrl.create({
title: this.translate.instant("tos.title"),
message: '<ion-icon name="add-circle"></ion-icon>some text'
});
the ion-icon is removed (not rendered). First I thought the framework was removing html markup, but html standard tags (h1, h2, p, etc…) are not.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:16 (3 by maintainers)
Top Results From Across the Web
ion-alert: Ionic API Alert Buttons with Custom Message Prompts
ion-alert dialog presents or collects information using inputs. Custom alert button messages appear above the app's content and must be manually dismissed.
Read more >AlertController - Ion-icon with the text in the buttons
Is that possible to display a ion-icon in the button with the text in AlertController? I tried below code but no luck. let...
Read more >Ionic 5 Alert, Confirm and Prompt Component Tutorial with ...
To create Alerts, we need to import the AlertController class from '@ionic/angular' then add in the class constructor() method to use its ...
Read more >Using alerts in Ionic - Daily Dev Tips
Adding alerts to prompt users for specifc actions or inputs in Ionic. ... alertController.create({ header: "Alert", message: "Choose an ...
Read more >How to Build a Capacitor File Explorer with Ionic Angular
In this tutorial we will build a file explorer to create files and folders, navigate through your different folder levels and add all ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The place you moved it to is not available anymore. Any chance to see the progress or get some indication of the very rough expected timeline?
Also Toast can have icons, maybe some thing like
or may be the approach like OP