W3cubDocs

/Angular 2 TypeScript

UrlSerializer

Stable Class

What it does

Serializes and deserializes a URL string into a URL tree.

Class Overview

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

Class Description

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.

Class Details

parse(url: string) : UrlTree

Parse a url into a UrlTree

serialize(tree: UrlTree) : string

Converts a UrlTree into a url

exported from @angular/router/index, defined in @angular/router/src/url_tree.ts

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v2.angular.io/docs/ts/latest/api/router/index/UrlSerializer-class.html