【发布时间】:2016-02-02 02:24:35
【问题描述】:
我正在导航到下一页:
$location.path("XXX/YYYY/");
当前视图的 URL 参数为:
http://www.go.com/?a=true;
现在当我导航时,它有 XXX/YYYY/"?a=true;
我试过了:
delete $routeParams.a;
和
delete $location.$$search.a;
但它不起作用。它不会删除参数。
导航到不同页面时如何设置路由参数?
【问题讨论】:
-
我试过删除 $routeParams.a;删除$location.$$search.a;
-
您使用哪个路由器? ngRoute 还是 ui-router?
标签: angularjs ngroute angularjs-ng-route