我有一个特别的建议,所以我们不能在我们的路线上使用斜线。角路由器提供了任何不使用斜杠的选项吗?我们希望使用路由器来提供查询。
示例:url应该如下所示:http://localhost:4200?item=2&filter=value&site=1
this.router.navigate([], { queryParams: { site: page}});上面的代码将提供如下所示的URL:http://localhost:4200/?site=1
我试图将index.html中的基本href设置为空字符串,但这不起作用。
<base href="">有人能帮我吗?
发布于 2018-04-09 08:41:35
角提供了两种我们可以用来实现客户端路由的策略,一种叫做
默认的角度是PathLocationStrategy。
不管是哪种方式,你的路线都会被砍掉。
https://stackoverflow.com/questions/49728217
复制相似问题