Instructor: We'll start by importing a new component called PageNotFound. This will act as a stand-in for our 404 page or similar.
We're going to create a new route record. We'll set the component to PageNotFound, but the path will be /*. Star is a wildcard value that will match everything it hits.
If we navigate to test, which is a URL we haven't defined, we'll end up on PageNotFound. If we move this route record up in our array, ahead of the Egghead path, and we try and navigate to test, we'll see what we want to see.
If we navigate to Egghead, we find that it's overwritten because / is hitting the path. What we want to do is remove the / and keep just , which will allow us to hit other URLs that are also matching but still act as that wildcard catch-all.
Alternatively, we can set our path to PageNotFound and alias that path to *. This allows us to do what we did before but also access PageNotFound directly through a URL if we were to want to navigate to it from another component.
As we see, we can still hit Egghead without overwriting it.