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
Error: Currently in page back navigation - component should be reattached instead of activated #1115
Hello guys,
I'm using the page-router-outlet component to have beautiful transitions of my child components, but I'm getting the following error after returning in the backward navigation and my app freezes (The tap system doesn't work and the navigation stops working):
About the navigation, I'm navigating to the same component (CategoryListComponent)... when my service doesn't return child categories, I'm navigating to my other component (ProductListComponent) and removing the current route of the history at the same time, example: category-list.component
@jdnichollsc I reviewed your project and saw that you had two page-route-outlets. One more within home.component.ts.
After looking at the component, i realised it was indeed causing the error. I would advise you employ the use of a componentless route angular provides.
@jdnichollsc If you need both routes to share a particular template, why not have HomeComponent be a wrapper component and then use Content Projection (ng-content)?
Or how about using the router-outlet since it fits perfectly?
Yeah, maybe the ng-content is a temporal solution... But I don't want to use the router-outlet component because I want to have the native transitions using the page-router-outlet :)
Activity
jdnichollsc commentedon Dec 7, 2017
About the navigation, I'm navigating to the same component (CategoryListComponent)... when my service doesn't return child categories, I'm navigating to my other component (ProductListComponent) and removing the current route of the history at the same time, example:
category-list.component
On the other hand with the
router-outletcomponent the navigation works well...tsonevn commentedon Dec 7, 2017
Hi @jdnichollsc,
Could you provide sample project, which would demonstrate the behavior, which you are facing and also could be used for debugging?
jdnichollsc commentedon Dec 8, 2017
@tsonevn of course, let me create a sample project, thanks for your help!
jdnichollsc commentedon Dec 14, 2017
Hi @tsonevn,
Sorry for the delay, you can see my sample project from the NativeScript Playground: https://play.nativescript.org/?template=play-ng&id=r4AICW&v=9
Let me know what you think, thanks for your help! 👍
jogboms commentedon Dec 14, 2017
@jdnichollsc I reviewed your project and saw that you had two
page-route-outlets. One more withinhome.component.ts.After looking at the component, i realised it was indeed causing the error. I would advise you employ the use of a componentless route angular provides.
Replace this:
With this.
jdnichollsc commentedon Dec 15, 2017
Ohh yes, @jogboms you're right!
But I want to use the HomeComponent as a layout for these other components :)
jdnichollsc commentedon Dec 15, 2017
Also it works perfect using
router-outletjogboms commentedon Dec 16, 2017
@jdnichollsc If you need both routes to share a particular template, why not have HomeComponent be a wrapper component and then use Content Projection (
ng-content)?Or how about using the router-outlet since it fits perfectly?
jdnichollsc commentedon Dec 22, 2017
Yeah, maybe the
ng-contentis a temporal solution... But I don't want to use therouter-outletcomponent because I want to have the native transitions using thepage-router-outlet:)jogboms commentedon Dec 22, 2017
Yeah. The
ng-contentseems more applicable here at least until using multi frames becomes available for {N} Angular.dvdbrk commentedon Jun 2, 2018
@jdnichollsc Did you found a solution at the end? Anyone?
jdnichollsc commentedon Jun 2, 2018
Hi @dvdbrk, for my case I need to try the following solution #1306 (comment)
what are you trying to do?
TheOnlyMatt commentedon Sep 12, 2018
Did you find a solution to your issue ?
I am facing the same problem and cannot find how to prevent a component to be reactivated ...
nmongiya commentedon Sep 21, 2018
I am also trying to find a solution for the same.