Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

withRouterConfig

Allows to provide extra parameters to configure Router.

      
      withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature
    
Parameters
options RouterConfigOptions

A set of parameters to configure Router, see RouterConfigOptions for additional information.

Returns

RouterConfigurationFeature: A set of providers for use with provideRouter.

See also

Usage notes

Basic example of how you can provide extra configuration options:

      
      const appRoutes: Routes = [];
bootstrapApplication(AppComponent,
  {
    providers: [
      provideRouter(appRoutes, withRouterConfig({
         onSameUrlNavigation: 'reload'
      }))
    ]
  }
);