Reputation: 7413
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?
Upvotes: 5
Views: 1064
Reputation: 7413
The solution is very simple:
{ path: '**', component: NotFoundComponent }
Upvotes: 12