Skip to content

Transition issues navigating to the same component #1306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jdnichollsc opened this issue Apr 27, 2018 · 4 comments
Closed

Transition issues navigating to the same component #1306

jdnichollsc opened this issue Apr 27, 2018 · 4 comments

Comments

@jdnichollsc
Copy link

Hi guys,
I'm navigating to the same component to show subcategories of the category selected in the previous page (CategoryListComponent). But the transition of the page-router-outlet doesn't work.

Transition issues

Thanks in advance, Nicholls

@tsonevn
Copy link
Contributor

tsonevn commented Apr 30, 2018

Hi @jdnichollsc,
If I understand you correctly, you are navigating from the main page to details page (e.g DetailPageComponent), and then you are navigating to the DetailPageComponent again while using new data.
If this is the case, this seems to be expected behaviour. The navigate method will refresh the data of the DetailPageComponent on the second navigation, but it will not make navigation to the same component.

Let me know if I am missing something or if the case is different. Also, it will help if you provide sample project, which can demonstrate your case and could be used for debugging.

@jdnichollsc
Copy link
Author

@tsonevn no, all the pages in this demo are the same component, exist any way to recover the navigation instead of only change the data of the same page (because the param of the route is different)?

Thanks in advance

@jdnichollsc
Copy link
Author

jdnichollsc commented Apr 30, 2018

Other frameworks like React Native and Xamarin have the transition of the navigation, without the navigation between pages it doesn't look like a native application, any way to correct that wrong behavior?

@tsonevn
Copy link
Contributor

tsonevn commented May 2, 2018

Hi @jdnichollsc,
We rechecked your case, however, this seems to be expected behaviour while making navigation to the same component. The component will reload only its content without making navigation with a transition. This behaviour is the same in a simple Angular application as well.
In your scenario, one possible option is to create an external page for the second details page. If this is not an option for you, you can also check out how to create an animation for the ListView, which can be executed on the second load of the component.

You can also review this thread in our forum, where you will find the third option for resolving this scenario in NS Angular application. The suggested way there is to customize NSRouteReuseStrategy. More info can be found at the above-attached link.

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants