You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Doing a 'backToPreviousPage' or Back Button to a Page using 'router-outlet' #941
Doing a back button navigation or Using the backToPreviousPage method to a page using <router-outlet></router-outlet> results in a blank page as though the <router-outlet></router-outlet> is no longer present on the page because further routing on that page no longer works.
Hey @jogboms we were not able to reproduce an issue using this sample project. In the project both back() and backToPreviousPage() methods are working as expected (code here). Please provide sample project or snippet which can preproduce your issue so we could investigate further.
@jogboms thank you for your clarifications - I can confirm that after some additional tests the issue is reproducible. We will investigate this case and will post the info in this issue.
navigate to the example and tap one of the nested pages than tap the button to navigate back.
A blank page appears.
@jogboms with the workflow used in our example backToPrevousPage works as expected (navigating back to the previous page loaded in the page-router-outlet) and the white screen is only loaded when in the nested router-outlet when there is no prevous page in the stack (which as a workaround can be controlled with a boolean flag). You might want to take a look at the provided sample and implement it as a temporary solution. Meanwhile we will post any additional info regarding this case in this issue.
@NickIliev I missed adding that i'm using the latest nativescript-angular with NativescriptAnimationsModule. I just checked your sample project.
I have the same issue, however, I'm not using the AnimationsModule. So it seems to be a more generic router-outlet issue then bound to additional module references.
Hey @jogboms - good news.
I tried your example with the @next version and angular@4.4.0 and it seems to be working now.
We had a big refactoring in the router implementation(#993) which probably healed the problem.
The fix will be included in the nativescript-angular@4.4.0 but you can try it now with @next tag.
Reacted by Jeremiah Ogbomo, Kevin L and NArtemev
Reacted by Jeremiah Ogbomo, Daniel Leal and Dominik Veselý
Activity
NickIliev commentedon Aug 14, 2017
Hey @jogboms we were not able to reproduce an issue using this sample project. In the project both
back()andbackToPreviousPage()methods are working as expected (code here). Please provide sample project or snippet which can preproduce your issue so we could investigate further.jogboms commentedon Aug 14, 2017
I did a fork of this sample project and made some changes here.
jogboms commentedon Aug 14, 2017
@NickIliev I missed adding that i'm using the latest nativescript-angular with
NativescriptAnimationsModule. I just checked your sample project.NickIliev commentedon Aug 14, 2017
@jogboms thank you for your clarifications - I can confirm that after some additional tests the issue is reproducible. We will investigate this case and will post the info in this issue.
Steps to reproduce the issue:
in the component class for
sub-route-one.component.tsandsub-route-two.component.tsand add back button in the respective HTML files
A blank page appears.
@jogboms with the workflow used in our example backToPrevousPage works as expected (navigating back to the previous page loaded in the page-router-outlet) and the white screen is only loaded when in the nested router-outlet when there is no prevous page in the stack (which as a workaround can be controlled with a boolean flag). You might want to take a look at the provided sample and implement it as a temporary solution. Meanwhile we will post any additional info regarding this case in this issue.
jogboms commentedon Aug 15, 2017
@NickIliev I have looked at your sample project but it still doesn't implement my said scenario which i implemented here forking this repo.
I am using back navigation to a page that contains Angular's
router-outlet. The router-outlet doesn't seem to come up again on that page.noomieware commentedon Sep 13, 2017
I have the same issue, however, I'm not using the AnimationsModule. So it seems to be a more generic router-outlet issue then bound to additional module references.
blueberrynotblue commentedon Oct 9, 2017
@jogboms found any tricks to workaround?
jogboms commentedon Oct 9, 2017
vakrilov commentedon Oct 10, 2017
Hey @jogboms - good news.
I tried your example with the
@nextversion andangular@4.4.0and it seems to be working now.We had a big refactoring in the router implementation(#993) which probably healed the problem.
The fix will be included in the
nativescript-angular@4.4.0but you can try it now with@nexttag.jogboms commentedon Oct 10, 2017
Thank you @vakrilov. Tested it out. Big ups.
I'd incorporate it into the larger app and see how it plays with the other things.
alexma01 commentedon Feb 16, 2018
I have app with angular version 4.4.1 and nativescript-angular 4.4.0 but i have same problem