UrlSerializer

Serializes and deserializes a URL string into a URL tree.

查看"说明"...

      
      abstract class UrlSerializer {
  abstract parse(url: string): UrlTree
  abstract serialize(tree: UrlTree): string
}
    

说明

The url serialization strategy is customizable. You can make all URLs case insensitive by providing a custom UrlSerializer.

See DefaultUrlSerializer for an example of a URL serializer.

方法

Parse a url into a UrlTree

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

UrlTree

Converts a UrlTree into a url

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

string