Open
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 5.3.0
- Android Runtime: 5.1.0
- NativeScript-Angular: 7.1.0
- Angular: 7.1.0
Describe the bug
On Android, navigation history is broken when navigating backward via nested page-router-outlets. Note: This works as expected on iOS just fine.
To Reproduce
- Create a NS Angular project with routes like so...
{ path: "", redirectTo: "/home/(homeoutlet:lounge)", pathMatch: "full" },
{ path: "home", component: HomeComponent, children: [
{ path: "lounge", component: LoungeComponent, outlet: "homeoutlet" },
{ path: "garage", component: GarageComponent, outlet: "homeoutlet" }
] },
{ path: "work", component: WorkComponent }
- On the Lounge page, add a button to navigate to "/home/(homeoutlet:garage)"
- On the Garage page, add buttons to navigate "routerExtensions.back()" and to "/work".
- On the Work page, add a button to navigate "routerExtendsion.back()".
- Run the app.
- Starting at Home/Lounge, navigate to Home/Garage then to Work. Then go back() and attempt to go back() again.
- The page will remain on the Home/Garage page despite that not being the start of the nav stack.
Expected behavior
If I navigate from home/lounge -> home/garage -> work, then i press back() twice, I should return to home/lounge.
Sample project
https://github.com/sbknick/ns-android-nested-back-nav
Additional context
On iOS, this functions as expected.