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 }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Now, we have routing in these ways.
foo.com/123/child/child1 -> Child1Component
foo.com/123/child/child2 -> Child2Component
Here, I tried to navigate to foo.com/123/child/child2 inside Child1Component.
I was thinking child module is apart from app module and it's lazy loaded so this code will be working correctly.
It's getting parentId from the URL inside the component and navigate using it.
But I don't like this approach because it's not scalable.
If I change the Route Param name or add some more routing params, I have to update the child components for routing as well.
Is there any better approach for handling routing in child components defined on child module lazy-loaded?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using Angular 8 and faced some problems with routing when I'm using lazy-loaded child modules.
Now, we have routing in these ways.
foo.com/123/child/child1 -> Child1Component
foo.com/123/child/child2 -> Child2Component
Here, I tried to navigate to foo.com/123/child/child2 inside Child1Component.
I was thinking child module is apart from app module and it's lazy loaded so this code will be working correctly.
But once I launched the application, it is navigated to foo.com/child/child2.
I was expecting foo.com/123/child/child2.
If I make these changes, it's working as expected.
It's getting parentId from the URL inside the component and navigate using it.
But I don't like this approach because it's not scalable.
If I change the Route Param name or add some more routing params, I have to update the child components for routing as well.
Is there any better approach for handling routing in child components defined on child module lazy-loaded?
The text was updated successfully, but these errors were encountered: