AngularJS ui-router:强制重新加载
发布时间:2020-12-17 08:09:20 所属栏目:安全 来源:网络整理
导读:我有一个AngularJS应用程序从index.html开始,并使用ui-router。基于触发器,我想重新加载完整的页面。我试过了: $state.go($state.current,$stateParams,{ reload: true,inherit: false,notify: true}); 但这不行。它不会重新加载我的初始index.html。 我
我有一个AngularJS应用程序从index.html开始,并使用ui-router。基于触发器,我想重新加载完整的页面。我试过了:
$state.go($state.current,$stateParams,{ reload: true,inherit: false,notify: true }); 但这不行。它不会重新加载我的初始index.html。 我可以: window.location.href = "index.html"; 但是,我在我的初始页面,而不是当前的状态。 应该设置window.location.href到index.html与查询字符串参数指定当前位置?如果我这样做,我如何导航到这个位置?
目前的诀窍是:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |