Reputation:
Angular how to manage invalid url errors:
Here is my working url:
http://192.168.0.1:4200/jobs/quick-worker-list/1306/1
When i hit this url:
http://192.168.0.1:4200/jobs/quick-worker-list
Than, how can I manage such error with angular-router?
Upvotes: 1
Views: 2284
Reputation: 6568
i hope you have a router config for this then you need to configure into your route config object
create a component for page not found
and add
{path: '404', component: NotFoundComponent},
{path: '**', redirectTo: '/404'}
it will Show the 404 page for any routes that don't exist.
Upvotes: 1