I am testing the Navigation feature on Android simulator, and you can find the environment information below.
This is the scenerio:
Page A --------(push with parameter)—> Page B--------(push to C) ------> Page C
when I stay on page C, I wanna navigate back t page B, there are two options on Android simulator:
1) click arrow icon on the top left corner;
2) click the Android hardware back button;
Everything is all right if I take the first opinion.
But, when I take opinion 2, it seems that a new instance of page B would be created by calling constructor, so the parameters brought from page A could not be available.
What I tried as of now:
use registerBackButtonAction(fn, priority) in app level, user nav.pop(), or return false; the constructor of page B is still called.
I have round-about by keeping the parameters in service, but it is really annoying.
Appreciate for your idea or suggestions.
@ionic/cli-utils : 1.9.2 ionic (Ionic CLI) : 3.9.2
Cordova CLI : not installed
@ionic/app-scripts : 1.3.7 Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.4.0 Ionic Framework : ionic-angular 3.3.0
Node : v7.9.0 npm : 5.3.0 OS : Windows 10