角UI路由器 - 花括号等在网址 [英] Angular ui-router - Curly brackets etc in url

查看:214
本文介绍了角UI路由器 - 花括号等在网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一种方式让大括号 {} 并在URL斜线 / 。但是URL看起来是这样的:

I have been searching for a way to have curly brackets{} and slashes / in the URL. But the URL looks like this:

URL appearance now:
http://localhost/#/?ph=tes:testes%2Ftest%7Blb0%7D

URL wanted appearance:
http://localhost/#/?ph=tes:tests/test{lb0}

我如何获得一个网址,而不%2F等?

How do I get an URL without the %2f etc?

在此先感谢!

推荐答案

所有的可以在一个URI(一的的字符/维基/ Uniform_Resource_Locator相对=nofollow>网址是一种 URI )在 RFC定义3986

All valid characters that can be used in a URI (a URL is a type of URI) are defined in RFC 3986.

所有其它字符可以在URL中使用的前提是它们的URL连接codeD之首。这涉及到改变为特定的codeS无效字符(通常在随后的十六进制数的百分比符号(%)的形式)。

All other characters can be used in a URL provided that they are "URL Encoded" first. This involves changing the invalid character for specific "codes" (usually in the form of the percent symbol (%) followed by a hexadecimal number).

这个链接, HTML URL编码参考,包含列表该编码为无效字符。

This link, HTML URL Encoding Reference, contains a list of the encodings for invalid characters.

快乐帮助!

这篇关于角UI路由器 - 花括号等在网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆