title: AngularJS: Can not read session value
body: <ul>
  <li>The session is set by server when the user logs in</li>
  </ul>
  <p>I want to retrieve this value in my <code>angular</code> front end, but it says <code>undefined</code></p>
  <p>The relevant code is</p>
  <pre><code>   $scope.logout = function () {
          console.log('session value', $cookieStore.get('session'));
      }
  </code></pre>
  <p>and my app is also configured to include <code>ngCookies</code></p>
  <pre><code>var app = angular.module('myApp', ['ngCookies']);
  </code></pre>
  <p>when I run my application, i see</p>
  <pre><code>session value undefined 
  </code></pre>
  <p>I can however, see the session in <code>Chrome Dev Tools</code></p>
  <p><img src="https://i.stack.imgur.com/guQDe.png" alt="enter image description here" /></p>
  <p>What is that I am missing?</p>