【发布时间】:2017-01-05 01:57:33
【问题描述】:
我想禁用 url 编码。
当我在下面使用这个时。
this.router.navigate(['/profile', { tags: 'one,two' }]);
网址是这样的
http://localhost:4200/profile;tags=one%2Ctwo
我希望它像下面这样漂亮
http://localhost:4200/profile;tags=one,two
有没有办法禁用url编码?
【问题讨论】:
-
@Deep,您的链接是针对角度 1 的,这有点不同。
-
在某些(简单)情况下,您可以自己序列化
this.router.navigateByUrl('/profile;tags=one,two'),这将在您传递 URL 时留下...这似乎对我有用。
标签: javascript http angular angular2-routing