lazy load of ionic3 tabs app messed up at android and browser Back Button
See original GitHub issueIonic version: (check one with “x”) [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x ] 3.x
I’m submitting a … (check one with “x”) [x ] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: While switching pages 3 or more layers deeper, then click back button of android or browser, can not go back to the page previous visited.
Expected behavior: go back to the page previous visited.
Steps to reproduce: The bug repo is at back-button-bug
- start the project using
ionic serve
- go to the
contact
tab, then click thego detail
button, then click thego detail deeper
button - click the back button of android or browser, you will find that you can not go back to the page previous visited. More clearly, it should be the page where
go detail
button display.
Other information: the back button works fine if you only view 1 or 2 layer。
Ionic info: (run ionic info
from a terminal/cmd prompt and paste output below):
global packages:
@ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.4
@ionic/cli-plugin-ionic-angular : 1.3.1
Ionic Framework : ionic-angular 3.0.1
System:
Node : v6.9.2
OS : macOS Sierra
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.9
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
@karansharma27 Yes, I found why that happened. If you have two pages , A is lazy loaded, B is not. When you navigate to B from A, after a while you want go back to A, you will find this issue. THE SOLUTION is make A and B both lazy loaded, that works for me.
-----------update-------------