fixed signout glitching bug
This commit is contained in:
parent
a193d78d90
commit
6c41e6fce2
@ -39,12 +39,8 @@ angular.module('core').controller('HeaderController', ['$rootScope', '$scope', '
|
||||
var promise = User.logout();
|
||||
promise.then(function() {
|
||||
Auth.logout();
|
||||
Auth.ensureHasCurrentUser(User);
|
||||
$scope.user = $rootScope.user = null;
|
||||
$state.go('listForms');
|
||||
|
||||
//Refresh view
|
||||
$state.reload();
|
||||
$state.go('signin', { reload: true });
|
||||
},
|
||||
function(reason) {
|
||||
console.error('Logout Failed: ' + reason);
|
||||
|
||||
@ -17,7 +17,7 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
|
||||
Auth.login(response);
|
||||
$scope.user = $rootScope.user = Auth.ensureHasCurrentUser(User);
|
||||
|
||||
if(statesToIgnore.indexOf($state.previous.state.name) === -1) {
|
||||
if($state.previous && statesToIgnore.indexOf($state.previous.state.name) === -1) {
|
||||
$state.go($state.previous.state.name, $state.previous.params);
|
||||
} else {
|
||||
$state.go('listForms');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user