@seantomas wrote:
I’m having trouble getting an ion-alert to display for a plain javascript (ionic via CDN) site. The ionic documentation for ion-alert and Javascript shows the following:
function presentAlert() { const alert = document.createElement('ion-alert'); alert.header = 'Alert'; alert.subHeader = 'Subtitle'; alert.message = 'This is an alert message.'; alert.buttons = ['OK']; document.body.appendChild(alert); return alert.present(); }
However, this only ever results in: “TypeError: alert.present is not a function”
What am I missing?
Posts: 1
Participants: 1