Toast on click navigate to another page

#1

I want to implement the following. when the user clicks on toast notification, the event click will navigate to a specific page. I did try the code below, but it doesn’t work.

code

const toast = await this.toastController.create({
        message: 'click on details ',
        color:'danger',
        duration:7000,
        showCloseButton:true

      });


      toast.onDidDismiss().then(()=>{
        this.nav.navigateForward('/home')
      })
       toast.present();
#2

Did the onDidDismiss get called?

#3

no Just for attempts