- In my application, there are number of pages which redirects to one common page.
- Now in that common page I use this.navCtrl.last() for returning back to the page it came from.
- It works properly in development mode as this.navCtrl.last() gives us last page name.
- But same functionality not working in production build, it doesn’t redirect to previous page.
in constructor I use
this.page = this.navCtrl.last().name;
and on click of button in the common page it redirects to the page from where it came from
so on button click I use
this.navCtrl.push(this.page);
For above scenario page redirects nowhere on click of button in production build, I just want the same results as in development mode.