question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
atscottcommented, Jul 9, 2020

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

0reactions
angular-automatic-lock-bot[bot]commented, Aug 9, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found