UrlSerializer
将 URL 字符串序列化和反序列化为 URL 树。
Serializes and deserializes a URL string into a URL tree.
abstract class UrlSerializer {
abstract parse(url: string): UrlTree
abstract serialize(tree: UrlTree): string
}
说明
url 序列化策略是可定制的。通过提供自定义 UrlSerializer,可以使所有 URL 都不区分大小写。
The url serialization strategy is customizable. You can make all URLs case insensitive by providing a custom UrlSerializer.
有关 URL 序列化程序的示例,请参见 DefaultUrlSerializer
See DefaultUrlSerializer
for an example of a URL serializer.
方法
将网址解析为 Parse a url into a |
将 Converts a |