interface
Extra configuration options that can be used with the withRouterConfig
function.
interface RouterConfigOptions { canceledNavigationResolution?: 'replace' | 'computed' onSameUrlNavigation?: OnSameUrlNavigation paramsInheritanceStrategy?: 'emptyOnly' | 'always' urlUpdateStrategy?: 'deferred' | 'eager' }
Property | Description |
---|---|
canceledNavigationResolution?: 'replace' | 'computed' | Configures how the Router attempts to restore state when a navigation is cancelled. 'replace' - Always uses 'computed' - Will attempt to return to the same index in the session history that corresponds to the Angular route when the navigation gets cancelled. For example, if the browser back button is clicked and the navigation is cancelled, the Router will trigger a forward navigation and vice versa. Note: the 'computed' option is incompatible with any The default value is |
onSameUrlNavigation?: OnSameUrlNavigation | Configures the default for handling a navigation request to the current URL. If unset, the See also: |
paramsInheritanceStrategy?: 'emptyOnly' | 'always' | Defines how the router merges parameters, data, and resolved data from parent to child routes. By default ('emptyOnly'), inherits parent parameters only for path-less or component-less routes. Set to 'always' to enable unconditional inheritance of parent parameters. Note that when dealing with matrix parameters, "parent" refers to the parent |
urlUpdateStrategy?: 'deferred' | 'eager' | Defines when the router updates the browser URL. By default ('deferred'), update after successful navigation. Set to 'eager' if prefer to update the URL at the beginning of navigation. Updating the URL early allows you to handle a failure of navigation by showing an error message with the URL that failed. |
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/router/RouterConfigOptions