I have a problem removing cookies set to a particular domain.
When the cookies were set at say domain, a.b.io they were being deleted by this code.
$scope.clearStorage = function(){
$localStorage.$reset();
var cookies = $cookies.getAll();
angular.forEach(cookies, function (v, k) {
$cookies.remove(k);
});
But when I set it to the domain b.io it isn't working. Tried to debug the the problem, the value of k is correct but $cookies.remove is simply not removing the cookie.
Try this code for delete cookie
EDIT: Since v1.4 $cookieStore has been deprecated (see docs), so from that version on you should use:
more details view this :https://stackoverflow.com/a/20988750/7255740