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.

Question: Prevent displaying wildcard route component if state is found

See original GitHub issue

I’m currently using a wildcard route {path: '**', component: PageNotFoundComponent} as specified in the docs. However, I was wondering if there is a quick fix for me to not display the component view until a redirect to the correct state route is performed (if it exists). At the moment my page displays Page Not Found while awaiting to be redirected to the correct page.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ggjersundcommented, Jul 16, 2019

I solved it myself using a resolver on the wildcard to check the isLoaded status. Seems to work now.

1reaction
ggjersundcommented, Oct 10, 2018

@jeroenheijmans I’ll take a deeper dive into your repository and see if I can figure out the difference. I’ll get back to you if I get it to work or not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Router: No Not Found Route? - Stack Overflow
I want to be able to serve 404 routes when something is not found. For example, /CA/SanFrancisco should be found and handled by...
Read more >
How To Handle Routing in React Apps with React Router
In this tutorial, you'll install and configure React Router, build a set of routes, and connect to them using the <Link> component.
Read more >
Router tutorial: tour of heroes - Angular
A wildcard route can navigate to a custom "404 Not Found" component or redirect to an existing route. The router selects the route...
Read more >
Angular Router: Child Routes, Auxiliary Routes, Master Detail
This is a comprehensive guide to the fundamental concepts of the Angular Router: routes, paths, components, outlets.
Read more >
Migrating to React Router v6: A complete guide
Migrate your React Router applications from v5 to v6 with this in-depth guide, including a review of additions and improvements from v5.
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