AngularJSUrlCodec
class
A UrlCodec
that uses logic from AngularJS to serialize and parse URLs and URL parameters.
class AngularJSUrlCodec implements UrlCodec { encodePath(path: string): string encodeSearch(search: string | { [k: string]: unknown; }): string encodeHash(hash: string) decodePath(path: string, html5Mode: boolean = true): string decodeSearch(search: string) decodeHash(hash: string) normalize(pathOrHref: string, search?: { [k: string]: unknown; }, hash?: string, baseUrl?: string): string areEqual(valA: string, valB: string) parse(url: string, base?: string) }
Methods
encodePath() | |||
---|---|---|---|
|
path | string |
Returns
string
encodeSearch() | |||
---|---|---|---|
|
search | string | { [k: string]: unknown; } |
Returns
string
encodeHash() | |||
---|---|---|---|
|
hash | string |
decodePath() | ||||||
---|---|---|---|---|---|---|
|
path | string | |
html5Mode | boolean | Optional. Default is |
Returns
string
decodeSearch() | |||
---|---|---|---|
|
search | string |
decodeHash() | |||
---|---|---|---|
|
hash | string |
normalize() | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
href | string |
Returns
string
normalize(path: string, search: { [k: string]: unknown; }, hash: string, baseUrl?: string): string
Parameters
path | string | |
search | object | |
hash | string | |
baseUrl | string | Optional. Default is |
Returns
string
areEqual() | ||||||
---|---|---|---|---|---|---|
|
valA | string | |
valB | string |
parse() | ||||||
---|---|---|---|---|---|---|
|
url | string | |
base | string | Optional. Default is |
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v9.angular.io/api/common/upgrade/AngularJSUrlCodec