{ "id": "api/router/Navigation", "title": "Navigation", "contents": "\n\n
\n
\n
\n \n API > @angular/router\n
\n \n
\n \n
\n

Navigationlink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

Information about a navigation operation.\nRetrieve the most recent navigation object with the\nRouter.getCurrentNavigation() method .

\n\n

See more...

\n
\n \n \n \n
\n \n type Navigation = {\n id: number;\n initialUrl: string | UrlTree;\n extractedUrl: UrlTree;\n finalUrl?: UrlTree;\n trigger: 'imperative' | 'popstate' | 'hashchange';\n extras: NavigationExtras;\n previousNavigation: Navigation | null;\n};\n \n
\n\n \n\n \n \n
\n

Descriptionlink

\n
    \n
  • id : The unique identifier of the current navigation.
  • \n
  • initialUrl : The target URL passed into the Router#navigateByUrl() call before navigation.\nThis is the value before the router has parsed or applied redirects to it.
  • \n
  • extractedUrl : The initial target URL after being parsed with UrlSerializer.extract().
  • \n
  • finalUrl : The extracted URL after redirects have been applied.\nThis URL may not be available immediately, therefore this property can be undefined.\nIt is guaranteed to be set after the RoutesRecognized event fires.
  • \n
  • trigger : Identifies how this navigation was triggered.\n-- 'imperative'--Triggered by router.navigateByUrl or router.navigate.\n-- 'popstate'--Triggered by a popstate event.\n-- 'hashchange'--Triggered by a hashchange event.
  • \n
  • extras : A NavigationExtras options object that controlled the strategy used for this\nnavigation.
  • \n
  • previousNavigation : The previously successful Navigation object. Only one previous\nnavigation is available, therefore this previous Navigation object has a null value for its\nown previousNavigation.
  • \n
\n\n \n
\n\n\n \n\n\n
\n
\n\n\n" }