I am developing an Android application using the Ionic Framework.
In this case, I have three views, view1, view2 and view3 .
Navigation will look like view1 -> view2 -> view3
When returning to view2 from view3 I need to change the stateParam param1 view2 value to perform some operations. Below is the code showing that I am changing the stateParam view2 value when I press the return button in view3
Below is the code to override the action of the subsystem of the Android device
$ionicPlatform.registerBackButtonAction(function() { if ($state.current.name == "view3") { $ionicHistory.backView().stateParams = {param1:true}; $ionicHistory.goBack();
After switching to view2 , if I press the "Back" button now, it will move to view3 , and not to view1 . Now I can only view view3 and view2 by clicking the back button without going to view1 .
How to make a back button to go to view1 from view2 Even after changing the stateParam view2 value?
Selva source share