-
Notifications
You must be signed in to change notification settings - Fork 93
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
changeLanguage does not work for route with parameters #154
Comments
Issue related to #151 |
Same issue here |
same issue here, downgrading Angular router did not help. |
I found a solution, what I did previously is making routes like this and it resulted into errors when trying to change the language.
|
Same issue here. The suggestion of children routes is unfortunately not suitable in all situations. |
instead of changelanguage try using this |
I'm submitting a ... (check one with "x")
Description
When I try to use changeLang for route with parameters, it tries to construct invalid url resulting in the following error (however it works fine for route without any parameters)
Cannot match any routes. URL Segment: ar/venue%2Fmovenpick-hotel-kuwait-1;slug=movenpick-hotel-kuwait-1
I have following routes
It throws mismatch route error for path
venue/:slug
andvenue/:venue-slug/:meeting-room-slug
but works fine for the rest of route.What I understand from error is, for example for route
venue/:slug
with slug valuemovenpick-hotel-kuwait-1
, it tries and construct the routear/venue%2Fmovenpick-hotel-kuwait-1;slug=movenpick-hotel-kuwait-1
the extra parameter that is added here is;slug=movenpick-hotel-kuwait-1
in the end. If it constructs just thear/venue%2Fmovenpick-hotel-kuwait-1
it must work.urlSegments
inLocalizeRouterService.prototype.changeLanguage
returns me following objectProblem is with the last element in the object, because URL already has slug value, it tries and add slug at the end as well resulting with the issue.
🌍 Your Environment
Angular Version:
Localize Router Version:
2.0.0-RC.1
The text was updated successfully, but these errors were encountered: