【发布时间】:2017-04-07 00:43:19
【问题描述】:
我有一个从 index.html 开始并使用 ui-router 的 AngularJS 应用程序。基于触发器,我想重新加载整个页面。我试过了:
$state.go($state.current, $stateParams, {
reload: true,
inherit: false,
notify: true
});
但这不起作用。它不会重新加载我的初始 index.html。
我能做到:
window.location.href = "index.html";
但是我在我的初始页面,而不是当前状态。
是否应该使用指定当前位置的查询字符串参数设置 window.location.href 到 index.html?如果我这样做了,我该如何导航到这个位置?
【问题讨论】:
标签: angularjs angular-ui-router