UrlSerializer

class

npm Package @angular/router
Module import { UrlSerializer } from '@angular/router';
Source router/src/url_tree.ts

Serializes and deserializes a URL string into a URL tree.

Overview

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

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.

Subclasses

  • DefaultUrlSerializer

Members

parse(url: string): UrlTree

Parse a url into a UrlTree

serialize(tree: UrlTree): string

Converts a UrlTree into a url

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v4.angular.io/api/router/UrlSerializer