更改协议而不更改状态或传递旧状态

时间:2016-03-03 18:47:33

标签: javascript angularjs https

$rootScope.$on('$stateChangeStart', function stateChangeStart(event, toState, toParams, fromState, fromParams)


var replace = $location.absUrl().replace('http', 'https');
$window.location.href = replace;
$state.params = fromState; //That line of course not working

我尝试了那个,但正如我预期的那样,它不起作用。如何更改网址后我可以通过旧状态。

0 个答案:

没有答案