Ionic2 root Nav

Asked

Viewed 102 times

0

Guys I’m developing an app in Ionic 2 and on the first screen Page1 and executed:

this.app.getRootNav().push(Page2)

My problem is that when user click back button I want you to run the method ionViewDidEnter() of Page1.

He only performs this method with this.nav.push(Page2) for example.

I wanted it to work with getRootNav.

2 answers

-1

Victor, try with the ionViewWillEnter. To be clearer, ionViewWillEnter will be triggered whenever you enter this page.

ionViewDidLoad will be curled and will therefore trigger the actions only once.

  • I’ve tried too and it doesn’t work.

-2

getRootNav deprecated

Try with getRootNavId

If you are using Http Api And in the case of firebase you only use ngOnInit

Browser other questions tagged

You are not signed in. Login or sign up in order to post.