Refresh / reload page after logout

I want the page to be refreshed / reloaded after logging out (the message is displayed on the screen for 5 seconds). The current code won't update it, so I can still see the username in the header, not something like a login button.

.controller('logout', ['$scope', 'location', 'config', 'auth', '$timeout', '$route', function($scope, location, config, auth, $timeout, $route) {
    auth.isValid($scope, function() {
        auth.logout(function() {
            $timeout(function() {
                location.path('/login');
                $route.reload();
            }, 5000);
        });
    });
}])

      

I checked this post but nothing changes.

+3


source to share


1 answer


You can use JavaScript layout for this.



location.reload ();

-1


source







All Articles