$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
我尝试了那个,但正如我预期的那样,它不起作用。如何更改网址后我可以通过旧状态。