Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71519

Router getCurrentNavigation().extras not working [iOS]

$
0
0

Hello,
The scenario is like this , I navigate using navigateByUrl and every time I pass data between pages.
Home is the root page.

The navigation is like this :
1- AppCompt (if new user) --> Profile --> home ( From home your can also access to Profile)
2- AppCompt (if user exist ) --> home ( From home your can also access to Profile)

this.router.navigateByUrl('/profile', { state: { data: false } }); From AppCompt to Profile

this.router.navigateByUrl('/profile', { state: { data: true } }); From Home to Profile

then I receive the data in Profile Constructor :
this.data = this.router.getCurrentNavigation().extras.state.data;

The problem happens only with iOS [Android works fine], when user is new it navigate to profile I receive False but when I try to go To profile from home after that it stays False , nothing change , If I restart the App it will navigate to Home (user exists) and I can see that I receive True.

Any Idea please

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>