On this page
NavigationExtras
interface
Options that modify the navigation strategy.
interface NavigationExtras {
relativeTo?: ActivatedRoute | null
queryParams?: Params | null
fragment?: string
preserveQueryParams?: boolean
queryParamsHandling?: QueryParamsHandling | null
preserveFragment?: boolean
skipLocationChange?: boolean
replaceUrl?: boolean
state?: {...}
}
Properties
Property | Description |
---|---|
relativeTo?: ActivatedRoute | null |
Specifies a root URI to use for relative navigation. For example, consider the following route configuration where the parent route has two children. The following
|
queryParams?: Params | null |
Sets query parameters to the URL.
|
fragment?: string |
Sets the hash fragment for the URL.
|
preserveQueryParams?: boolean |
DEPRECATED: Use |
queryParamsHandling?: QueryParamsHandling | null |
How to handle query parameters in the router link for the next navigation. One of:
|
preserveFragment?: boolean |
When true, preserves the URL fragment for the next navigation
|
skipLocationChange?: boolean |
When true, navigates without pushing a new state into history.
|
replaceUrl?: boolean |
When true, navigates while replacing the current state in history.
|
state?: { [k: string]: any; } |
Developer-defined state that can be passed to any navigation. Access this value through the After a navigation completes, the router writes an object containing this value together with a Note that |
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v9.angular.io/api/router/NavigationExtras