如何重新加载离子

时间:2015-09-07 05:55:06

标签: angularjs ionic-framework ionic

我正在开发离子框架中的移动应用程序。我已经集成了登录和注销功能。当我注销时它不会注销。当我刷新页面然后用户注销。这是我的代码:

$scope.logout = function() {
    alert("here");
    storageService.clearAll();
    $ionicHistory.clearCache();
    $ionicHistory.clearHistory();   
    $ionicHistory.nextViewOptions({ disableBack: true, historyRoot: true });    
    $scope.popover.hide();
    $state.go('services', {}, {reload: true})   
}

1 个答案:

答案 0 :(得分:0)

要在您的应用中重新加载当前网址,您只需调用此功能:

document.location.reload()

但是,正如你在@ mudasser-ajaz的评论中所提到的那样,这可能是不好的做法,因为你应该指出你的州没有显示用户被注销的原因。

相关问题