I wrote a custom 404 page in Angular 4 and want to keep the wrong url that was entered. You can see the behavior on github for example. They display a 404 page for not existing urls. Example: https://github.com/cdkdfjkdjf
Currently I configured my router like this:
{ path: '404', component: NotFoundComponent },
{ path: '**', redirectTo: '404' }
Any idea how to archive this?
The solution is very simple:
{ path: '**', component: NotFoundComponent }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With