After dismissing the modal setRoot page side menu is not working


#1

after dismissing the modal setRoot page side menu is not working
Below is my modal dismiss code

closeImageModal(){
this.viewCtrl.dismiss();
this.navCtrl.setRoot(DashboardPage)
}

Please help me out
Thanks in advance


#2

Try this.

presentModal() {
   let modal = this.modalCtrl.create(MyPage);
   modal.onDidDismiss(data => {
     this.navCtrl.setRoot(DashboardPage);
   });
   modal.present();
 }