法一、$location.path("/index/clientTakeGoods/clientTakeGoodsResult");(不支持火狐)
法二、$state.go('index.clientTakeGoods.clientTakeGoodsResult');(不支持谷歌)
法三、var url=$state.href('index.clientTakeGoods.clientTakeGoodsResult',{basicType:8});
window.open(url,'_self');
法四、window.location="/index#/index/clientTakeGoods/clientTakeGoodsResult";
$state.go和$location.href有什么區別
前者不在瀏覽器中保存跳轉前的網址,因此按返回鍵將無效 后者不存在這個問題 reload方法,強迫瀏覽器刷新當前頁面
replace方法,通過指定URL替換當前緩存在歷史里(客戶端)的項目,因此當使用replace方法之后,你不能通過“前進”和“后退”來訪問已經被替換的URL。
在實際應用的時候,重新刷新頁面的時候,我們通常使用: location.reload() 或者是 history.go(0) 來做。。因為這種做法就像是客戶端點F5刷新頁面,
所以頁面的method="post"的時候,會出現“網頁過期”的提示。那是因為Session的安全保護機制。