function
Allows to provide extra parameters to configure Router.
withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature options | RouterConfigOptions | A set of parameters to configure Router, see |
RouterConfigurationFeature: A set of providers for use with provideRouter.
Basic example of how you can provide extra configuration options:
const appRoutes: Routes = [];
bootstrapApplication(AppComponent,
{
providers: [
provideRouter(appRoutes, withRouterConfig({
onSameUrlNavigation: 'reload'
}))
]
}
);
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/router/withRouterConfig