Skip to content

Is it possible to adjust the codegenerator to add default export or named export of the Route Name? #1812

Answered by schiller-manuel
itshallrun asked this question in Q&A
Discussion options

You must be logged in to vote

you can use Route.fullPath in the component that is rendered by the route without causing circular dependencies.
The problem of those circular dependencies can occur if you import e.g. RouteA in component ComponentB that is rendered on RouteB.

This is why we tend to recommend using string literals instead.

about that "having to pass the param again": you should not have to pass the param again, also if you use string literals.
Maybe there is a bug with relative routes though.
Can you please provide a minimal complete example by forking and adapting one of the existing examples on stackblitz?

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@itshallrun
Comment options

@schiller-manuel
Comment options

@itshallrun
Comment options

@schiller-manuel
Comment options

Answer selected by itshallrun
@itshallrun
Comment options

@schiller-manuel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants