UrlSerializer

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 router-index, defined in router/src/url_tree.ts

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部