On this page
ParamMap
interface
A map that provides access to the required and optional parameters specific to a route. The map supports retrieving a single value with get() or multiple values with getAll().
interface ParamMap {
keys: string[]
has(name: string): boolean
get(name: string): string | null
getAll(name: string): string[]
}
See also
Properties
| Property | Description |
|---|---|
keys: string[] |
Read-Only Names of the parameters in the map. |
Methods
|
has()
|
|||
|---|---|---|---|
Reports whether the map contains a given parameter. |
|||
|
name |
string |
The parameter name. |
Returns
boolean: True if the map contains the given parameter, false otherwise.
|
get()
|
|||
|---|---|---|---|
Retrieves a single value for a parameter. |
|||
|
name |
string |
The parameter name. |
Returns
string | null: The parameter's single value, or the first value if the parameter has multiple values, or null when there is no such parameter.
|
getAll()
|
|||
|---|---|---|---|
Retrieves multiple values for a parameter. |
|||
|
name |
string |
The parameter name. |
Returns
string[]: An array containing one or more values, or an empty array if there is no such parameter.
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v11.angular.io/api/router/ParamMap