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

How to display toast without press key in ionic 5

$
0
0

I have search this topic “toast” in ionic 5, most of example uses press a button to display a toast.
Is there a way to automatic toast in home page when user move from login page into the home page.

below is my toast,

async showToast() {
    await this.toastCtrl.create({
      message: "Hey! it's a toast",
      duration: 2000,
      position: 'middle',
      buttons: [{
        text: 'OK',
        handler: () => {
          console.log("ok clicked");
        }
      }]
    }).then(res => res.present());
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



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