title: undefined while using getItem
body: <p>I'm trying to send an object between two pages in javascript but I'm getting undefined knowing that I'm using tomcat server
  here's the first function in the first page : </p>
  
  <pre><code>$http.get('rest/client/authentifier/'+$scope.nouveauClient.numerocompte + '/' + $scope.nouveauClient.mdp)
  .then(function(clientresult) {
      window.localStorage.setItem("client",clientresult.data);
      parent.location = "acceuilClient.html";
  })
  </code></pre>
  
  <p>here's the second function in the seconde page : </p>
  
  <pre><code>var user;
  
  $scope.display = function()
  {
      user =  window.localStorage.getItem('client');
      alert("amal  "+user.idclient);
  }
  </code></pre>