While working with Ionic 2, I am currently facing a challenge in identifying the name of the page that triggered the navigation (PUSHER) before entering the destination page (PUSHEE).
Within the PUSHEE page, I have an ionViewCanEnter
function where I need to determine the name of the PUSHER page. However, when I attempt to use NavController to retrieve the active page, it returns undefined
. Although the NavController itself is not undefined, the response from getActive
is. Can anyone recommend a solution for obtaining the name of the PUSHER page?
ionViewCanEnter(): boolean {
console.log('active page', this.navCtrl.getActive());
return true;
}