填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

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.

方法

将网址解析为 UrlTree

Parse a url into a UrlTree

      
      abstract parse(url: string): UrlTree
    
参数
url string
返回值

UrlTree

UrlTree 转换为 url

Converts a UrlTree into a url

      
      abstract serialize(tree: UrlTree): string
    
参数
tree UrlTree
返回值

string