5 lines
12 KiB
JSON

{
"id": "api/router/ParamMap",
"title": "ParamMap",
"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/ParamMap\", \"name\": \"ParamMap\" } }\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/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L30-L67\" 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/shared.ts#L30-L67\" 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=\"parammap\">ParamMap<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/ParamMap#parammap\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label interface\">interface</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 map that provides access to the required and optional parameters\nspecific to a route.\nThe map supports retrieving a single value with <code>get()</code>\nor multiple values with <code>getAll()</code>.</p>\n\n \n </section>\n \n \n <section class=\"interface-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\ninterface <a href=\"api/router/ParamMap\" class=\"code-anchor\">ParamMap</a> {\n <a class=\"code-anchor\" href=\"api/router/ParamMap#keys\"><span class=\"member-name\">keys</span>: string[]</a>\n <a class=\"code-anchor\" href=\"api/router/ParamMap#has\"><span class=\"member-name\">has</span>(name: string): boolean</a>\n <a class=\"code-anchor\" href=\"api/router/ParamMap#get\"><span class=\"member-name\">get</span>(name: string): string | null</a>\n <a class=\"code-anchor\" href=\"api/router/ParamMap#getAll\"><span class=\"member-name\">getAll</span>(name: string): string[]</a>\n}\n</code-example>\n\n \n \n\n\n \n \n\n</section>\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/ParamMap#see-also\"><i class=\"material-icons\">link</i></a></h2>\n <ul>\n \n <li><p><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\">URLSearchParams</a></p>\n</li>\n </ul>\n</section>\n\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/ParamMap#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=\"keys\"></a>\n <code class=\"\"><span class=\"member-name\">keys</span>: string[]</code>\n </td>\n <td><span class=\"read-only-property\">Read-Only</span>\n \n <p>Names of the parameters in the map.</p>\n\n \n </td>\n </tr>\n \n </tbody>\n </table>\n</section>\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/ParamMap#methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"has\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"has\">\n has()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/ParamMap#has\"><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/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L42-L47\" 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/shared.ts#L42-L47\" 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>Reports whether the map contains a given parameter.</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\">has</span>(name: string): boolean</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">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>name</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>The parameter name.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns\">Returns</h6>\n <p><code>boolean</code>: True if the map contains the given parameter, false otherwise.</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=\"get\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"get\">\n get()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/ParamMap#get\"><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/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L48-L55\" 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/shared.ts#L48-L55\" 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>Retrieves a single value for a parameter.</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\">get</span>(name: string): string | null</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-1\">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>name</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>The parameter name.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-1\">Returns</h6>\n <p><code>string | null</code>: The parameter's single value,\nor the first value if the parameter has multiple values,\nor <code>null</code> when there is no such parameter.</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=\"getAll\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"getall\">\n getAll()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/ParamMap#getall\"><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/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L56-L63\" 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/shared.ts#L56-L63\" 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>Retrieves multiple values for a parameter.</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\">getAll</span>(name: string): string[]</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-2\">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>name</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>The parameter name.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-2\">Returns</h6>\n <p><code>string[]</code>: An array containing one or more values,\nor an empty array if there is no such parameter.</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</section>\n\n\n \n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/router\n - api/router/ActivatedRoute\n - api/router/ActivatedRouteSnapshot\n - api/router/Params\n - api/router/UrlTree\n - api/router/convertToParamMap\n - guide/router\n - guide/router-tutorial-toh\n - guide/testing-components-scenarios\n-->\n<!-- links from this doc:\n - /api\n - api/router\n - api/router/ParamMap#get\n - api/router/ParamMap#getAll\n - api/router/ParamMap#getall\n - api/router/ParamMap#has\n - api/router/ParamMap#keys\n - api/router/ParamMap#methods\n - api/router/ParamMap#parammap\n - api/router/ParamMap#properties\n - api/router/ParamMap#see-also\n - https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n - https://github.com/angular/angular/edit/master/packages/router/src/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L30-L67\n - https://github.com/angular/angular/edit/master/packages/router/src/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L42-L47\n - https://github.com/angular/angular/edit/master/packages/router/src/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L48-L55\n - https://github.com/angular/angular/edit/master/packages/router/src/shared.ts?message=docs(router)%3A%20describe%20your%20change...#L56-L63\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/shared.ts#L30-L67\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/shared.ts#L42-L47\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/shared.ts#L48-L55\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/src/shared.ts#L56-L63\n-->"
}