@pdj wrote:
when it comes to last page(HomePage), I want to exit app.
but the problem is that weirdly,
app.getActiveNav().getActive() is undefined.
andI took a look closer on app.getActiveNav()
(I checked Log and saw undefined on root)
my code is located in app.components.ts
platform.registerBackButtonAction(() => { let nav = this.app.getActiveNav().getActive() let activeView = nav.getActive(); console.log("back pressed"); console.log(nav) console.log(activeView) nav.pop(); });
weirdly , I came to second page from homepage,
when I press back button on hardware,
it says no views in the stack to be removed
(I came to second page by using navCtrl.push())
Posts: 1
Participants: 1