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 Nov 15, 2022. It is now read-only.
I tought that the URL would be /company/<SOME-GUID>/inbound after redirection but the URL becomes /company/inbound, losing the URL parameter :companyId.
Is there a way to keep the URL parameters after redirection ?
Edit:
By looking more into it I've noticed that the second part of the url (in this example: .../:companyId) gets removed wheter it is a parameter or not.
This happens in router.js:37 when the URL object constructs the new URL, the issue can be avoided if the parameter current ends with a backslash.
Running into the same issue here. It isn't even specific to redirects, it happens even with normal navigation when your path doesn't end with a slash. Heck, even navigating to ./ blows away the url parameter at the end. It's like it considers non slash-ended paths as "files" rather than "directories", and it considers "./" a level up.
My router chain looks something like /game* -> /:gameId* -> (/, /content/:contentId), with the gameId param specifying a prop to be passed to this detail page, and then the detail page being responsible for showing some specific content as an overlay by navigating relatively. Within that page, when you navigate to content/... or ./content/... or even ./, it destroys that last segment specifying the gameId unless the URL ends with a slash, totally breaking the routing.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Given this first-level routes:
In the
CompanyMainPage
component I have the following child routes:Inside the
CompanyMainPage
component I've setup a redirect from\
to\inbound
like so:I tought that the URL would be
/company/<SOME-GUID>/inbound
after redirection but the URL becomes/company/inbound
, losing the URL parameter:companyId
.Is there a way to keep the URL parameters after redirection ?
Edit:
By looking more into it I've noticed that the second part of the url (in this example:
.../:companyId
) gets removed wheter it is a parameter or not.This happens in router.js:37 when the
URL
object constructs the new URL, the issue can be avoided if the parametercurrent
ends with a backslash.See this example (open the Console): https://jsfiddle.net/0bqve6w9/
The text was updated successfully, but these errors were encountered: