【发布时间】:2018-09-09 09:54:11
【问题描述】:
我正在尝试使用 AngularJS $location 来设置浏览器的 url,如下所示:
$location.path("/post").search({
id: post.id
});
但每当我这样做时,网址都会设置为 http://localhost:5000/#!/post?id=0 而不是 http://localhost:5000/post?id=0
#!/ 出现有什么原因吗?
【问题讨论】:
-
我的回答无效
-
您的回答很有帮助,但只删除了 !来自 url,所以它会读取 /#/post 这不是我想要的。
标签: angularjs