title: $cookieStore.get() return undefined in angularjs
body: <p>I'm writing a cookie from a server through the response and it's fine the problem is when I try to read the same cookie using angularJs $cookieStore.get() returns always 'undefined', I have debugged with the developer tools using chrome and the cookie is there,</p>
  <pre><code>console.log($cookieStore.get(&quot;r&quot;));
  </code></pre>
  <p>the $cookieStore seems to be injected and running ok, I'm just wondering why angularJs can't read the cookie.</p>
  <p><img src="https://i.stack.imgur.com/wOYbL.png" alt="r: undefined" /></p>
  <p><img src="https://i.stack.imgur.com/YvpyJ.png" alt="enter image description here" /></p>
  <p><strong>Edit:</strong></p>
  <p>I tried with $cookies service and I get undefined as well.</p>
  <p>I send the cookie in the server side without any problem, I'm getting the cookie in chrome developer tools</p>
  <p>I'm using Service Stack and the code is the following:</p>
  <pre><code>public override object Logout(IServiceBase service, ServiceStack.ServiceInterface.Auth.Auth request)
          {
              var resp = service.RequestContext.Get&lt;IHttpResponse&gt;();
              resp.Cookies.AddCookie(new Cookie { Name = &quot;r&quot;, Path = &quot;/&quot;, Value = &quot;from server&quot;, HttpOnly = false, Discard = false, Expires = DateTime.Now.AddHours(12) });
              return base.Logout(service, request);
          }
  </code></pre>