title: Cannot read localhost cookies (return undefined)
body: <p>Trying to use ngCookies to read cookie.
  There is a cookie:</p>
  
  <pre><code>Name: cookie-name
  Content:value
  Host:localhost
  </code></pre>
  
  <p>controller.js:</p>
  
  <pre><code>var myControllers = angular.module('myControllers', ['ngCookies']);
  
  myControllers.controller('AboutController', [
  '$scope', 
  '$location',
  '$cookies', 
  function ($scope, $location, $cookies) {
      $scope.test1 = $cookies.get('cookie-name');
      $scope.test2 = '2';
  }]);
  </code></pre>
  
  <p>html is :</p>
  
  <pre><code>&lt;div class="jumbotron text-center"&gt;
      &lt;h1&gt;About Page&lt;/h1&gt;
      &lt;p&gt;test1:{{ test1 }}&lt;/p&gt;
      &lt;p&gt;test2:{{ test2 }}&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But the resulted page is:</p>
  
  <pre><code>About Page
  
  test1:
  
  test2:2
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I created the cookie in spring controller.</p>
  
  <pre><code>import javax.servlet.http.Cookie;
      @RequestMapping(value = "/login", method = RequestMethod.POST)
      @ResponseBody
      public AuthenticationResponse logIn(
          @RequestParam(value="username") String username,
          @RequestParam(value="password") String password,
          HttpServletResponse response) 
      {
          /* Test setting cookie */
          Cookie cookie = new Cookie("cookie-name", username);
          cookie.setMaxAge(3600*10);
          response.addCookie(cookie);
          AccessToken token = userService.authenticateUser(username, password);
          return new AuthenticationResponse(token.getEncodedToken(), token.getExpiryDate());
      }
  </code></pre>
  
  <p>I have no idea why the cookie cannot be read successfully. Any suggestion is welcome. Thanks.</p>