javascript - How to read cookie from the response header? -
hi developing web application in angularjs. on successful login returning cookies. trying read cookies in success function ends undefined.
$http.post(url, sub).then(function (response) { //trying read cookieheaders=logintoken=63d4551a-2c09-4b08-9b4b-837f0f3806fd&loginid=2 settimeout(function () { loginsuccess(response); }, 1000); }, function (error) { settimeout(function () { hideloader(); }, 1000); toastr.error($filter('translate')(error.data.msg)); });
i tried inside success function console.log($cookiestore.get('cookieheaders'));
it gives me undefined.
may know possible read above cookie inside success function? in regard appreciated. thank you.
Comments
Post a Comment