Ionic 2 modal error


below is the exception

I also have this issue.

Hi @halohalo, Guess you have not defined this.modalCtrl. Try using

let modal - modalCtrl.create(HomePage);

or define

this.modalCtrl = modalCtrl;

I tried, but it does not work.

ok… Guess you cannot define modal inside constructor. If you want to start your modal on page, use it under ionViewLoaded. Or check your login validation before you push to page UserCenter