ParamMap
提供访问特定于路由的必需和可选参数的映射表。该映射表支持使用 get() 检索单个值或使用 getAll() 检索多个值。
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[]
}
参见
属性
| 属性 | 说明 |
|---|---|
keys: string[] | 只读 映射表中参数的名称。 Names of the parameters in the map. |
方法
报告此映射表是否包含给定的参数。 Reports whether the map contains a given parameter. |
检索参数的单个值。 Retrieves a single value for a parameter. |
检索参数的多个值。 Retrieves multiple values for a parameter. |