class
final
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) }
encodePath() | |||
---|---|---|---|
|
path | string |
string
encodeSearch() | |||
---|---|---|---|
|
search | string | { [k: string]: unknown; } |
string
encodeHash() | |||
---|---|---|---|
|
hash | string |
decodePath() | ||||||
---|---|---|---|---|---|---|
|
path | string | |
html5Mode | boolean | Optional. Default is |
string
decodeSearch() | |||
---|---|---|---|
|
search | string |
decodeHash() | |||
---|---|---|---|
|
hash | string |
normalize() | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
href | string |
string
normalize(path: string, search: { [k: string]: unknown; }, hash: string, baseUrl?: string): string
path | string | |
search | object | |
hash | string | |
baseUrl | string | Optional. Default is |
string
areEqual() | ||||||
---|---|---|---|---|---|---|
|
valA | string | |
valB | string |
parse() | ||||||
---|---|---|---|---|---|---|
|
url | string | |
base | string | Optional. Default is |
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/common/upgrade/AngularJSUrlCodec