angular-cookie icon indicating copy to clipboard operation
angular-cookie copied to clipboard

Setting cookie with angular-cookie does not appear on $cookies

Open poliveira89 opened this issue 10 years ago • 1 comments

#39 seems very similar to this, so I don't know if it's duplicated, if it his. Sorry about that.

So, I have encountered a problem if I set a cookie with:

ipCookie('stuff', 'helloWorld');

I cannot see it with:

$cookies
// or
$cookies.stuff

But, I can't retrieve the values with:

ipCookie
// or
ipCookie('stuff')

It's intentionally that I cannot retrieve cookies with $cookies?

poliveira89 avatar Feb 06 '15 12:02 poliveira89

Which version of Angular are you using? If you are using 1.3+ then you are using $cookies incorrectly: https://docs.angularjs.org/api/ngCookies/service/$cookies

robinj avatar Apr 04 '16 11:04 robinj