On this page
Navigation
interface
Information about a navigation operation. Retrieve the most recent navigation object with the Router.getCurrentNavigation() method .
interface Navigation {
  id: number
  initialUrl: UrlTree
  extractedUrl: UrlTree
  finalUrl?: UrlTree
  trigger: 'imperative' | 'popstate' | 'hashchange'
  extras: NavigationExtras
  previousNavigation: Navigation | null
}
   Description
- id : The unique identifier of the current navigation.
 - initialUrl : The target URL passed into the 
Router#navigateByUrl()call before navigation. This is the value before the router has parsed or applied redirects to it. - extractedUrl : The initial target URL after being parsed with 
UrlSerializer.extract(). - finalUrl : The extracted URL after redirects have been applied. This URL may not be available immediately, therefore this property can be 
undefined. It is guaranteed to be set after theRoutesRecognizedevent fires. - trigger : Identifies how this navigation was triggered. -- 'imperative'--Triggered by 
router.navigateByUrlorrouter.navigate. -- 'popstate'--Triggered by a popstate event. -- 'hashchange'--Triggered by a hashchange event. - extras : A 
NavigationExtrasoptions object that controlled the strategy used for this navigation. - previousNavigation : The previously successful 
Navigationobject. Only one previous navigation is available, therefore this previousNavigationobject has anullvalue for its ownpreviousNavigation. 
Properties
| Property | Description | 
|---|---|
id: number | 
       The unique identifier of the current navigation.  | 
      
initialUrl: UrlTree | 
       The target URL passed into the   | 
      
extractedUrl: UrlTree | 
       The initial target URL after being parsed with   | 
      
finalUrl?: UrlTree | 
       The extracted URL after redirects have been applied. This URL may not be available immediately, therefore this property can be   | 
      
trigger: 'imperative' | 'popstate' | 'hashchange' | 
       Identifies how this navigation was triggered. 
  | 
      
extras: NavigationExtras | 
       Options that controlled the strategy used for this navigation. See   | 
      
previousNavigation: Navigation | null | 
       The previously successful   | 
      
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
 https://v14.angular.io/api/router/Navigation