Wildcard route with parameter
See original GitHub issueπ bug report
Description
When I use the path path: '**'
for handling 404 page, it works fine. but I have a language parameter before each route. So I must have something like this:
path: ':lang/**'
But when I navigate to a url like this: en/abcd
it gives me this error:
Error: Cannot match any routes. URL Segment: 'en/abcd'
Any idea?
π₯ Exception or Error
Error: Cannot match any routes. URL Segment: 'en/abcd'
π Your Environment
Angular Version: 8.0.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Adding Path Parameters and Wildcards to Route Paths
This topic describes how to add path parameters and wildcards to route paths in API deployment specifications.
Read more >Wildcard Routes (**) Can Be Scoped To Route Sub-Trees In ...
Ben Nadel demonstrates that the wildcard route (**) can be used multiple times in an Angular 5.1.3 application. And, can be scoped toΒ ......
Read more >Angular 2 route with parameter acts as wildcard route
I have an angular app with multiple Modules, which each define some routes. ... I can now use the route http://localhost:4200/exchange/Sample/BaseΒ ...
Read more >Common Routing Tasks - Angular
The wildcard route comes last because it matches every URL and the Router selects it ... method to access the ActivatedRoute and track...
Read more >What are wildcard routes? - Gatsby Cloud
What are wildcard routes? Β· Any route that uses filesystem route api that uses dynamic segments or splat routes Β· A redirect that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing as working as intended. Example provided by @alxhub works with route params: https://stackblitz.com/edit/angular-ivy-router-base-wc8gqk?file=src%2Fapp%2Fapp.module.ts
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.