On this page
UrlCreationOptions
interface
Options that modify the Router URL. Supply an object containing any of these properties to a Router navigation function to control how the target URL should be constructed.
interface UrlCreationOptions {
  relativeTo?: ActivatedRoute | null
  queryParams?: Params | null
  fragment?: string
  queryParamsHandling?: QueryParamsHandling | null
  preserveFragment?: boolean
}
   Child interfaces
See also
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   A value of   | 
      
queryParams?: Params | null | 
       Sets query parameters to the URL.  | 
      
fragment?: string | 
       Sets the hash fragment for the URL.  | 
      
queryParamsHandling?: QueryParamsHandling | null | 
       How to handle query parameters in the router link for the next navigation. One of: 
 The "preserve" option discards any new query params:  The "merge" option appends new query params to the params from the current URL:  In case of a key collision between current parameters and those in the   | 
      
preserveFragment?: boolean | 
       When true, preserves the URL fragment for the next navigation  | 
      
© 2010–2022 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
 https://v13.angular.io/api/router/UrlCreationOptions