How to get plain text from cookie in angularjs

171 Views Asked by At

How to get value from cookie in Angularjs, cookieStore.get only accepts encoded text like %22sometext22%.
if i make cookie like this ,its ok but i have cookies with plain text and then i cant get that value, any ideas?

2

There are 2 best solutions below

2
On

try to use the $cookies service instead of the $cookieStore service to manipulate your cookies as the last one is deprecated.

0
On

ok i found out how to get that properly

var cookieValue = $cookies["cookieName"];