# Angular Routing

The Angular router is the standardized way of navigating between pages within an Angular application.

ExtraOptions is used to provide extra configuration to your router.

const routes: Routes = [  { path: '/', component: HomePageComponent },  { path: '**', component: PageNotFoundComponent },];
For other routing errors, the errorHandler attribute on ExtraOptions can be used (see: Handling Routing Errors)
When handling routing errors other than a 404 page (which should be handled as described above), use errorHandler. In the documentation, this is described as an instance of @angular/core ErrorHandler, but this should actually be an instance of @angular/router ErrorHandler. In short, this is a function of signature (error: any): any, not an ErrorHandler class object. This also means that you don’t have access to dependency injection, which makes handling errors here — short of logging them to a system like Sentry or Honeybadger — challenging.