I have an AngularJS application running along with a Rails backend. The Rails creates a cookie during authentication process, and I have to check if this cookie exists on my AngularJS to know if the user is still logged in.
The problem is: Even though both applications (rails and angular) are in the same domain, I can't access the cookie inside AngularJS.
I tried "$cookies.getAll()" and it returns "Object{}".I tried "document.cookie.split(";")", but it returns "[""]".
If I create a cookie with the same content inside my AngularJS code, I am able to have access to it, but since the cookie is created inside Rails, it never gets available to me.
How can I have access to this cookie?