5 lines
389 KiB
JSON

{
"id": "api/router/Router",
"title": "Router",
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/router\", \"name\": \"@angular/router\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/router/Router\", \"name\": \"Router\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/router\">@angular/router</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L380-L1394\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L380-L1394\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"router\">Router<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#router\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label class\">class</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>A service that provides navigation among views and URL manipulation capabilities.</p>\n\n \n </section>\n \n \n \n <section class=\"class-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\nclass <a href=\"api/router/Router\" class=\"code-anchor\">Router</a> {\n <a class=\"code-anchor\" href=\"api/router/Router#constructor()\"><span class=\"member-name\">constructor</span>(rootComponentType: Type&#x3C;any>, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes)</a>\n <a class=\"code-anchor\" href=\"api/router/Router#events\"><span class=\"member-name\">events</span>: Observable&#x3C;Event></a>\n <a class=\"code-anchor\" href=\"api/router/Router#routerState\"><span class=\"member-name\">routerState</span>: RouterState</a>\n <a class=\"code-anchor\" href=\"api/router/Router#errorHandler\"><span class=\"member-name\">errorHandler</span>: ErrorHandler</a>\n <a class=\"code-anchor\" href=\"api/router/Router#malformedUriErrorHandler\"><span class=\"member-name\">malformedUriErrorHandler</span>: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree</a>\n <a class=\"code-anchor\" href=\"api/router/Router#navigated\"><span class=\"member-name\">navigated</span>: boolean</a>\n <a class=\"code-anchor\" href=\"api/router/Router#urlHandlingStrategy\"><span class=\"member-name\">urlHandlingStrategy</span>: UrlHandlingStrategy</a>\n <a class=\"code-anchor\" href=\"api/router/Router#routeReuseStrategy\"><span class=\"member-name\">routeReuseStrategy</span>: RouteReuseStrategy</a>\n <a class=\"code-anchor\" href=\"api/router/Router#onSameUrlNavigation\"><span class=\"member-name\">onSameUrlNavigation</span>: 'reload' | 'ignore'</a>\n <a class=\"code-anchor\" href=\"api/router/Router#paramsInheritanceStrategy\"><span class=\"member-name\">paramsInheritanceStrategy</span>: 'emptyOnly' | 'always'</a>\n <a class=\"code-anchor\" href=\"api/router/Router#urlUpdateStrategy\"><span class=\"member-name\">urlUpdateStrategy</span>: 'deferred' | 'eager'</a>\n <a class=\"code-anchor\" href=\"api/router/Router#relativeLinkResolution\"><span class=\"member-name\">relativeLinkResolution</span>: 'legacy' | 'corrected'</a>\n <a class=\"code-anchor\" href=\"api/router/Router#config\"><span class=\"member-name\">config</span>: Routes</a>\n <a class=\"code-anchor\" href=\"api/router/Router#url\"><span class=\"member-name\">url</span>: string</a>\n <a class=\"code-anchor\" href=\"api/router/Router#initialNavigation\"><span class=\"member-name\">initialNavigation</span>(): void</a>\n <a class=\"code-anchor\" href=\"api/router/Router#setUpLocationChangeListener\"><span class=\"member-name\">setUpLocationChangeListener</span>(): void</a>\n <a class=\"code-anchor\" href=\"api/router/Router#getCurrentNavigation\"><span class=\"member-name\">getCurrentNavigation</span>(): Navigation | null</a>\n <a class=\"code-anchor\" href=\"api/router/Router#resetConfig\"><span class=\"member-name\">resetConfig</span>(config: Routes): void</a>\n <a class=\"code-anchor\" href=\"api/router/Router#dispose\"><span class=\"member-name\">dispose</span>(): void</a>\n <a class=\"code-anchor\" href=\"api/router/Router#createUrlTree\"><span class=\"member-name\">createUrlTree</span>(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree</a>\n <a class=\"code-anchor\" href=\"api/router/Router#navigateByUrl\"><span class=\"member-name\">navigateByUrl</span>(url: string | UrlTree, extras: NavigationBehaviorOptions = {...}): Promise&#x3C;boolean></a>\n <a class=\"code-anchor\" href=\"api/router/Router#navigate\"><span class=\"member-name\">navigate</span>(commands: any[], extras: NavigationExtras = { skipLocationChange: false }): Promise&#x3C;boolean></a>\n <a class=\"code-anchor\" href=\"api/router/Router#serializeUrl\"><span class=\"member-name\">serializeUrl</span>(url: UrlTree): string</a>\n <a class=\"code-anchor\" href=\"api/router/Router#parseUrl\"><span class=\"member-name\">parseUrl</span>(url: string): UrlTree</a>\n <a class=\"code-anchor\" href=\"api/router/Router#isActive\"><span class=\"member-name\">isActive</span>(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean</a>\n}\n</code-example>\n\n \n \n\n</section>\n\n\n \n<section class=\"see-also\">\n <h2 id=\"see-also\">See also<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#see-also\"><i class=\"material-icons\">link</i></a></h2>\n <ul>\n \n <li><p><code><a href=\"api/router/Route\" class=\"code-anchor\">Route</a></code>.</p>\n</li>\n <li><p><a href=\"guide/router\">Routing and Navigation Guide</a>.</p>\n</li>\n </ul>\n</section>\n\n\n \n \n \n\n\n\n\n\n\n<h2 id=\"constructor\">Constructor<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#constructor\"><i class=\"material-icons\">link</i></a></h2>\n<a id=\"constructor()\"></a>\n<table class=\"is-full-width method-table constructor\">\n \n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Creates the router service.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">constructor</span>(rootComponentType: <a href=\"api/core/Type\" class=\"code-anchor\">Type</a>&#x3C;any>, urlSerializer: <a href=\"api/router/UrlSerializer\" class=\"code-anchor\">UrlSerializer</a>, rootContexts: <a href=\"api/router/ChildrenOutletContexts\" class=\"code-anchor\">ChildrenOutletContexts</a>, location: <a href=\"api/common/Location\" class=\"code-anchor\">Location</a>, injector: <a href=\"api/core/Injector\" class=\"code-anchor\">Injector</a>, loader: <a href=\"api/core/NgModuleFactoryLoader\" class=\"code-anchor\">NgModuleFactoryLoader</a>, compiler: <a href=\"api/core/Compiler\" class=\"code-anchor\">Compiler</a>, config: <a href=\"api/router/Routes\" class=\"code-anchor\">Routes</a>)</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table constructor-overload-parameters\">\n <tbody>\n \n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>rootComponentType</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/core/Type\" class=\"code-anchor\">Type</a><any></any></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>urlSerializer</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/UrlSerializer\" class=\"code-anchor\">UrlSerializer</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>rootContexts</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/ChildrenOutletContexts\" class=\"code-anchor\">ChildrenOutletContexts</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>location</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/common/Location\" class=\"code-anchor\">Location</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>injector</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/core/Injector\" class=\"code-anchor\">Injector</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>loader</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/core/NgModuleFactoryLoader\" class=\"code-anchor\">NgModuleFactoryLoader</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>compiler</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/core/Compiler\" class=\"code-anchor\">Compiler</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"constructor-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>config</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/Routes\" class=\"code-anchor\">Routes</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n\n\n\n<section class=\"instance-properties\">\n <h2 id=\"properties\">Properties<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#properties\"><i class=\"material-icons\">link</i></a></h2>\n <table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th>Property</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"events\"></a>\n <code class=\"\"><span class=\"member-name\">events</span>: Observable&#x3C;<a href=\"api/router/Event\" class=\"code-anchor\">Event</a>></code>\n </td>\n <td><span class=\"read-only-property\">Read-Only</span>\n \n <p>An event stream for routing events in this NgModule.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"routerState\"></a>\n <code class=\"\"><span class=\"member-name\">routerState</span>: <a href=\"api/router/RouterState\" class=\"code-anchor\">RouterState</a></code>\n </td>\n <td><span class=\"read-only-property\">Read-Only</span>\n \n <p>The current state of routing in this NgModule.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"errorHandler\"></a>\n <code class=\"\"><span class=\"member-name\">errorHandler</span>: <a href=\"api/core/ErrorHandler\" class=\"code-anchor\">ErrorHandler</a></code>\n </td>\n <td>\n \n <p>A handler for navigation errors in this NgModule.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"malformedUriErrorHandler\"></a>\n <code class=\"\"><span class=\"member-name\">malformedUriErrorHandler</span>: (error: URIError, urlSerializer: <a href=\"api/router/UrlSerializer\" class=\"code-anchor\">UrlSerializer</a>, url: string) => <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code>\n </td>\n <td>\n \n <p>A handler for errors thrown by <code>Router.parseUrl(url)</code>\nwhen <code>url</code> contains an invalid character.\nThe most common case is a <code>%</code> sign\nthat's not encoded and is not part of a percent encoded sequence.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"navigated\"></a>\n <code class=\"\"><span class=\"member-name\">navigated</span>: boolean</code>\n </td>\n <td>\n \n <p>True if at least one navigation event has occurred,\nfalse otherwise.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"urlHandlingStrategy\"></a>\n <code class=\"\"><span class=\"member-name\">urlHandlingStrategy</span>: <a href=\"api/router/UrlHandlingStrategy\" class=\"code-anchor\">UrlHandlingStrategy</a></code>\n </td>\n <td>\n \n <p>A strategy for extracting and merging URLs.\nUsed for AngularJS to Angular migrations.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"routeReuseStrategy\"></a>\n <code class=\"\"><span class=\"member-name\">routeReuseStrategy</span>: <a href=\"api/router/RouteReuseStrategy\" class=\"code-anchor\">RouteReuseStrategy</a></code>\n </td>\n <td>\n \n <p>A strategy for re-using routes.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"onSameUrlNavigation\"></a>\n <code class=\"\"><span class=\"member-name\">onSameUrlNavigation</span>: 'reload' | 'ignore'</code>\n </td>\n <td>\n \n <p>How to handle a navigation request to the current URL. One of:</p>\n<ul>\n<li><code>'ignore'</code> : The router ignores the request.</li>\n<li><code>'reload'</code> : The router reloads the URL. Use to implement a \"refresh\" feature.</li>\n</ul>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"paramsInheritanceStrategy\"></a>\n <code class=\"\"><span class=\"member-name\">paramsInheritanceStrategy</span>: 'emptyOnly' | 'always'</code>\n </td>\n <td>\n \n <p>How to merge parameters, data, and resolved data from parent to child\nroutes. One of:</p>\n\n <ul>\n<li><code>'emptyOnly'</code> : Inherit parent parameters, data, and resolved data\nfor path-less or component-less routes.</li>\n<li><code>'always'</code> : Inherit parent parameters, data, and resolved data\nfor all child routes.</li>\n</ul>\n\n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"urlUpdateStrategy\"></a>\n <code class=\"\"><span class=\"member-name\">urlUpdateStrategy</span>: 'deferred' | 'eager'</code>\n </td>\n <td>\n \n <p>Determines when the router updates the browser URL.\nBy default (<code>\"deferred\"</code>), updates the browser URL after navigation has finished.\nSet to <code>'eager'</code> to update the browser URL at the beginning of navigation.\nYou can choose to update early so that, if navigation fails,\nyou can show an error message with the URL that failed.</p>\n\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"relativeLinkResolution\"></a>\n <code class=\"\"><span class=\"member-name\">relativeLinkResolution</span>: 'legacy' | 'corrected'</code>\n </td>\n <td>\n \n <p>Enables a bug fix that corrects relative link resolution in components with empty paths.</p>\n\n \n <p>See also:</p>\n <ul>\n \n <li><p><code><a href=\"api/router/RouterModule\" class=\"code-anchor\">RouterModule</a></code></p>\n</li>\n </ul>\n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"config\"></a>\n <code class=\"\"><span class=\"member-name\">config</span>: <a href=\"api/router/Routes\" class=\"code-anchor\">Routes</a></code>\n </td>\n <td>\n <span class=\"from-constructor\">Declared in Constructor</span>\n \n \n </td>\n </tr>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"url\"></a>\n <code class=\"\"><span class=\"member-name\">url</span>: string</code>\n </td>\n <td><span class=\"read-only-property\">Read-Only</span>\n \n <p>The current URL.</p>\n\n \n </td>\n </tr>\n \n </tbody>\n </table>\n</section>\n\n\n\n<section class=\"instance-methods\">\n <h2 id=\"methods\">Methods<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"initialNavigation\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"initialnavigation\">\n initialNavigation()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#initialnavigation\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L945-L954\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L945-L954\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Sets up the location change listener and performs the initial navigation.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">initialNavigation</span>(): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-1\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n <h6 class=\"no-anchor\" id=\"returns\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"setUpLocationChangeListener\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"setuplocationchangelistener\">\n setUpLocationChangeListener()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#setuplocationchangelistener\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L955-L987\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L955-L987\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Sets up the location change listener. This listener detects navigations triggered from outside\nthe Router (the browser back/forward buttons, for example) and schedules a corresponding Router\nnavigation so that the correct events, guards, etc. are triggered.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">setUpLocationChangeListener</span>(): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-2\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n <h6 class=\"no-anchor\" id=\"returns-1\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"getCurrentNavigation\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"getcurrentnavigation\">\n getCurrentNavigation()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#getcurrentnavigation\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1029-L1033\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1029-L1033\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>The current Navigation object if one exists</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">getCurrentNavigation</span>(): <a href=\"api/router/Navigation\" class=\"code-anchor\">Navigation</a> | null</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-3\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n <h6 class=\"no-anchor\" id=\"returns-2\">Returns</h6>\n <p><code><a href=\"api/router/Navigation\" class=\"code-anchor\">Navigation</a> | null</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"resetConfig\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"resetconfig\">\n resetConfig()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#resetconfig\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1039-L1061\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1039-L1061\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Resets the route configuration used for navigation and generating links.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">resetConfig</span>(config: <a href=\"api/router/Routes\" class=\"code-anchor\">Routes</a>): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-4\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>config</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/Routes\" class=\"code-anchor\">Routes</a></code></td>\n <td class=\"param-description\">\n <p>The route array for the new configuration.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-3\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n <tr>\n <td class=\"usage-notes\">\n <h4 id=\"resetConfig-usage-notes\">Usage Notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#resetConfig-usage-notes\"><i class=\"material-icons\">link</i></a></h4>\n <code-example>\nrouter.resetConfig([\n { path: 'team/:id', component: TeamCmp, children: [\n { path: 'simple', component: SimpleCmp },\n { path: 'user/:name', component: UserCmp }\n ]}\n]);\n</code-example>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <a id=\"dispose\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"dispose\">\n dispose()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#dispose\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1067-L1076\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1067-L1076\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Disposes of the router.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">dispose</span>(): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-5\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n <h6 class=\"no-anchor\" id=\"returns-4\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"createUrlTree\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"createurltree\">\n createUrlTree()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#createurltree\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1077-L1146\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1077-L1146\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Appends URL segments to the current URL tree to create a new URL tree.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">createUrlTree</span>(commands: any[], navigationExtras: <a href=\"api/router/UrlCreationOptions\" class=\"code-anchor\">UrlCreationOptions</a> = {}): <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-6\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>commands</code>\n </td>\n <td class=\"param-type\"><code>any[]</code></td>\n <td class=\"param-description\">\n <p>An array of URL fragments with which to construct the new URL tree.\nIf the path is static, can be the literal URL string. For a dynamic path, pass an array of path\nsegments, followed by the parameters for each segment.\nThe fragments are applied to the current URL tree or the one provided in the <code>relativeTo</code>\nproperty of the options object, if supplied.</p>\n\n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>navigationExtras</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/UrlCreationOptions\" class=\"code-anchor\">UrlCreationOptions</a></code></td>\n <td class=\"param-description\">\n <p>Options that control the navigation strategy.</p>\n<p> Optional. Default is <code>{}</code>.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-5\">Returns</h6>\n <p><code><a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code>: The new URL tree.</p>\n \n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n <tr>\n <td class=\"usage-notes\">\n <h4 id=\"createUrlTree-usage-notes\">Usage Notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#createUrlTree-usage-notes\"><i class=\"material-icons\">link</i></a></h4>\n <code-example>\n// create /team/33/user/11\nrouter.createUrlTree(['/team', 33, 'user', 11]);\n\n// create /team/33;expand=true/user/11\nrouter.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n\n// you can collapse <a href=\"api/upgrade/static\" class=\"code-anchor\">static</a> segments like this (this works only with the first passed-in value):\nrouter.createUrlTree(['/team/33/user', userId]);\n\n// If the first segment can contain slashes, and you do not want the router to split it,\n// you can do the following:\nrouter.createUrlTree([{segmentPath: '/one/two'}]);\n\n// create /team/33/(user/11//right:chat)\nrouter.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n\n// remove the right secondary node\nrouter.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n\n// assuming the current url is `/team/33/user/11` and the route points to `user/11`\n\n// navigate to /team/33/user/11/details\nrouter.createUrlTree(['details'], {relativeTo: route});\n\n// navigate to /team/33/user/22\nrouter.createUrlTree(['../22'], {relativeTo: route});\n\n// navigate to /team/44/user/22\nrouter.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n\nNote that a value of `null` or `undefined` for `relativeTo` indicates that the\ntree should be created relative to the root.\n</code-example>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <a id=\"navigateByUrl\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"navigatebyurl\">\n navigateByUrl()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#navigatebyurl\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1147-L1185\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1147-L1185\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Navigates to a view using an absolute route path.</p>\n\n <p>See also:</p>\n <ul>\n \n <li><p><a href=\"guide/router\">Routing and Navigation guide</a></p>\n</li>\n </ul>\n \n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">navigateByUrl</span>(url: string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a>, extras: <a href=\"api/router/NavigationBehaviorOptions\" class=\"code-anchor\">NavigationBehaviorOptions</a> = {\n skipLocationChange: false\n}): Promise&#x3C;boolean></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-7\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></td>\n <td class=\"param-description\">\n <p>An absolute path for a defined route. The function does not apply any delta to the\ncurrent URL.</p>\n\n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>extras</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/NavigationBehaviorOptions\" class=\"code-anchor\">NavigationBehaviorOptions</a></code></td>\n <td class=\"param-description\">\n <p>An object containing properties that modify the navigation strategy.</p>\n<p> Optional. Default is <code>{ skipLocationChange: false }</code>.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-6\">Returns</h6>\n <p><code>Promise&#x3C;boolean></code>: A Promise that resolves to 'true' when navigation succeeds,\nto 'false' when navigation fails, or is rejected on error.</p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n <tr>\n <td class=\"usage-notes\">\n <h4 id=\"navigateByUrl-usage-notes\">Usage Notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#navigateByUrl-usage-notes\"><i class=\"material-icons\">link</i></a></h4>\n <p>The following calls request navigation to an absolute path.</p>\n<code-example>\nrouter.navigateByUrl(\"/team/33/user/11\");\n\n// Navigate without updating the URL\nrouter.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n</code-example>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <a id=\"navigate\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"navigate\">\n navigate()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#navigate\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1186-L1221\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1186-L1221\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Navigate based on the provided array of commands and a starting point.\nIf no starting route is provided, the navigation is absolute.</p>\n\n <p>See also:</p>\n <ul>\n \n <li><p><a href=\"guide/router\">Routing and Navigation guide</a></p>\n</li>\n </ul>\n \n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">navigate</span>(commands: any[], extras: <a href=\"api/router/NavigationExtras\" class=\"code-anchor\">NavigationExtras</a> = { skipLocationChange: false }): Promise&#x3C;boolean></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-8\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>commands</code>\n </td>\n <td class=\"param-type\"><code>any[]</code></td>\n <td class=\"param-description\">\n <p>An array of URL fragments with which to construct the target URL.\nIf the path is static, can be the literal URL string. For a dynamic path, pass an array of path\nsegments, followed by the parameters for each segment.\nThe fragments are applied to the current URL or the one provided in the <code>relativeTo</code> property\nof the options object, if supplied.</p>\n\n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>extras</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/NavigationExtras\" class=\"code-anchor\">NavigationExtras</a></code></td>\n <td class=\"param-description\">\n <p>An options object that determines how the URL should be constructed or\ninterpreted.</p>\n<p> Optional. Default is <code>{ skipLocationChange: false }</code>.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-7\">Returns</h6>\n <p><code>Promise&#x3C;boolean></code>: A Promise that resolves to <code>true</code> when navigation succeeds, to <code>false</code> when navigation\nfails,\nor is rejected on error.</p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n <tr>\n <td class=\"usage-notes\">\n <h4 id=\"navigate-usage-notes\">Usage Notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#navigate-usage-notes\"><i class=\"material-icons\">link</i></a></h4>\n <p>The following calls request navigation to a dynamic route path relative to the current URL.</p>\n<code-example>\nrouter.navigate(['team', 33, 'user', 11], {relativeTo: route});\n\n// Navigate without updating the URL, overriding the default behavior\nrouter.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n</code-example>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <a id=\"serializeUrl\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"serializeurl\">\n serializeUrl()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#serializeurl\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1222-L1226\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1222-L1226\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Serializes a <code><a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code> into a string</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">serializeUrl</span>(url: <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a>): string</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-9\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-8\">Returns</h6>\n <p><code>string</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"parseUrl\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"parseurl\">\n parseUrl()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#parseurl\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1227-L1237\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1227-L1237\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Parses a string into a <code><a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">parseUrl</span>(url: string): <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-10\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-9\">Returns</h6>\n <p><code><a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"isActive\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"isactive\">\n isActive()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/Router#isactive\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1257-L1272\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1257-L1272\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n \n <tr>\n <td>\n <details class=\"overloads\">\n <summary>\n <div class=\"icon-action-header\">\n <h4 class=\"no-anchor\" id=\"3-overloads\">3 overloads...</h4>\n <span class=\"actions\">\n <span class=\"show-all\">Show All</span>\n <span class=\"collapse-all\">Hide All</span>\n <i class=\"material-icons expand\">expand_more</i>\n </span>\n </div>\n </summary>\n <div class=\"detail-contents\">\n \n \n <h5 class=\"no-anchor\" id=\"overload-1\">Overload #1</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Returns whether the url is activated.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading deprecated-api-item\"><span class=\"member-name\">isActive</span>(url: string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a>, exact: boolean): boolean</code-example>\n\n \n <div class=\"deprecated\">\n <p><strong>Deprecated</strong> Use <code>IsActiveUrlTreeOptions</code> instead.</p>\n<ul>\n<li>The equivalent <code>IsActiveUrlTreeOptions</code> for <code>true</code> is\n<code>{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}</code>.</li>\n<li>The equivalent for <code>false</code> is\n<code>{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}</code>.</li>\n</ul>\n\n </div>\n\n <h6 class=\"no-anchor\" id=\"parameters-11\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>exact</code>\n </td>\n <td class=\"param-type\"><code>boolean</code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-10\">Returns</h6>\n <p><code>boolean</code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin\">\n \n <h5 class=\"no-anchor\" id=\"overload-2\">Overload #2</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Returns whether the url is activated.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">isActive</span>(url: string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a>, matchOptions: <a href=\"api/router/IsActiveMatchOptions\" class=\"code-anchor\">IsActiveMatchOptions</a>): boolean</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-12\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>matchOptions</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/router/IsActiveMatchOptions\" class=\"code-anchor\">IsActiveMatchOptions</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-11\">Returns</h6>\n <p><code>boolean</code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin\">\n \n <h5 class=\"no-anchor\" id=\"overload-3\">Overload #3</h5>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">isActive</span>(url: string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a>, matchOptions: boolean | <a href=\"api/router/IsActiveMatchOptions\" class=\"code-anchor\">IsActiveMatchOptions</a>): boolean</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-13\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/router/UrlTree\" class=\"code-anchor\">UrlTree</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>matchOptions</code>\n </td>\n <td class=\"param-type\"><code>boolean | <a href=\"api/router/IsActiveMatchOptions\" class=\"code-anchor\">IsActiveMatchOptions</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-12\">Returns</h6>\n <p><code>boolean</code></p>\n\n \n\n\n \n\n \n</div>\n \n \n </div>\n </details>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n</section>\n\n\n\n \n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common/Location\n - api/common/LocationStrategy\n - api/common/PlatformLocation\n - api/router\n - api/router/ActivatedRouteSnapshot\n - api/router/ExtraOptions\n - api/router/Navigation\n - api/router/NavigationBehaviorOptions\n - api/router/NavigationExtras\n - api/router/Route\n - api/router/RouterEvent\n - api/router/RouterLink\n - api/router/RouterLinkActive\n - api/router/RouterLinkWithHref\n - api/router/RouterModule\n - api/router/RouterOutletContract\n - api/router/RouterState\n - api/router/RouterStateSnapshot\n - api/router/Routes\n - api/router/UrlCreationOptions\n - api/router/UrlSegment\n - api/router/UrlTree\n - api/router/testing\n - api/router/testing/RouterTestingModule\n - guide/accessibility\n - guide/architecture\n - guide/docs-style-guide\n - guide/glossary\n - guide/lazy-loading-ngmodules\n - guide/ngmodule-faq\n - guide/observables-in-angular\n - guide/router\n - guide/router-tutorial\n - guide/router-tutorial-toh\n - guide/singleton-services\n - guide/testing-components-scenarios\n - guide/upgrade\n - start/start-routing\n-->\n<!-- links from this doc:\n - /api\n - api/common/Location\n - api/core/Compiler\n - api/core/ErrorHandler\n - api/core/Injector\n - api/core/NgModuleFactoryLoader\n - api/core/Type\n - api/router\n - api/router/ChildrenOutletContexts\n - api/router/Event\n - api/router/IsActiveMatchOptions\n - api/router/Navigation\n - api/router/NavigationBehaviorOptions\n - api/router/NavigationExtras\n - api/router/Route\n - api/router/RouteReuseStrategy\n - api/router/Router#config\n - api/router/Router#constructor\n - api/router/Router#constructor()\n - api/router/Router#createUrlTree\n - api/router/Router#createUrlTree-usage-notes\n - api/router/Router#createurltree\n - api/router/Router#dispose\n - api/router/Router#errorHandler\n - api/router/Router#events\n - api/router/Router#getCurrentNavigation\n - api/router/Router#getcurrentnavigation\n - api/router/Router#initialNavigation\n - api/router/Router#initialnavigation\n - api/router/Router#isActive\n - api/router/Router#isactive\n - api/router/Router#malformedUriErrorHandler\n - api/router/Router#methods\n - api/router/Router#navigate\n - api/router/Router#navigate-usage-notes\n - api/router/Router#navigateByUrl\n - api/router/Router#navigateByUrl-usage-notes\n - api/router/Router#navigatebyurl\n - api/router/Router#navigated\n - api/router/Router#onSameUrlNavigation\n - api/router/Router#paramsInheritanceStrategy\n - api/router/Router#parseUrl\n - api/router/Router#parseurl\n - api/router/Router#properties\n - api/router/Router#relativeLinkResolution\n - api/router/Router#resetConfig\n - api/router/Router#resetConfig-usage-notes\n - api/router/Router#resetconfig\n - api/router/Router#routeReuseStrategy\n - api/router/Router#router\n - api/router/Router#routerState\n - api/router/Router#see-also\n - api/router/Router#serializeUrl\n - api/router/Router#serializeurl\n - api/router/Router#setUpLocationChangeListener\n - api/router/Router#setuplocationchangelistener\n - api/router/Router#url\n - api/router/Router#urlHandlingStrategy\n - api/router/Router#urlUpdateStrategy\n - api/router/RouterModule\n - api/router/RouterState\n - api/router/Routes\n - api/router/UrlCreationOptions\n - api/router/UrlHandlingStrategy\n - api/router/UrlSerializer\n - api/router/UrlTree\n - api/upgrade/static\n - guide/router\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1029-L1033\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1039-L1061\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1067-L1076\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1077-L1146\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1147-L1185\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1186-L1221\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1222-L1226\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1227-L1237\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L1257-L1272\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L380-L1394\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L945-L954\n - https://github.com/angular/angular/edit/master/packages/router/src/router.ts?message=docs(router)%3A%20describe%20your%20change...#L955-L987\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1029-L1033\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1039-L1061\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1067-L1076\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1077-L1146\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1147-L1185\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1186-L1221\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1222-L1226\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1227-L1237\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L1257-L1272\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L380-L1394\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L945-L954\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/router.ts#L955-L987\n-->"
}