I want page to be refreshed/reloaded after logout (message on screen is visible for 5 seconds). Current code won't refresh it so I'm still seeing user's name in header instead of something else like 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've checked this post but nothing changes.