I am unable to clear access token event after logging out. I just created method which is clearing whole user object and redirecting to login page when clicking on logout button.
$scope.logout = function(){
$scope.user ={};
$state.go('static.login');
$(".loader").fadeOut("slow");
}
Still I able to see access token in Application tab while inspecting login page.
Above is image that can show, And I able to see last logged in user object details while debugging after clicking submit without entering any credentials.As you can see below.
$scope.setCookie = function(cname, cvalue, exMins) {
var d = new Date();
d.setTime(d.getTime() + (exMins*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
after modification of logout method. clearing access token.
$scope.logout = function(){
/*
$state.go('static.login');
$(".loader").fadeOut("slow");*/
//var token=$cookies.get('ACCESS_TOKEN');
$cookies.remove('ACCESS_TOKEN');
$scope.user={};
$state.go('static.login');
}