Skip to content

Commit

Permalink
docs(router): document the value format for Params.
Browse files Browse the repository at this point in the history
This was previously just strings, but after angular#11373 can also contain arrays of strings.

Sadly the type declaration cannot be changed for backwards compatibility.
  • Loading branch information
mprobst committed Mar 6, 2017
1 parent 728fe47 commit 2d2b7c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/@angular/router/src/shared.ts
Expand Up @@ -21,10 +21,14 @@ export const PRIMARY_OUTLET = 'primary';
/**
* A collection of parameters.
*
* Values are either `string`s (for single URL params like `?foo=bar` => `{foo: 'bar'}`), or
* `string[]` for repeated parameters (for repeated URL params like `?foo=bar&foo=baz` => `{foo:
* ['bar', 'baz']}`).
*
* @stable
*/
export type Params = {
[key: string]: any
[key: string]: any // actually string|string[], but cannot change due to backwards compatibility.
};

const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';
Expand Down

0 comments on commit 2d2b7c3

Please sign in to comment.