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 :
$http.get('rest/client/authentifier/'+$scope.nouveauClient.numerocompte + '/' + $scope.nouveauClient.mdp)
.then(function(clientresult) {
window.localStorage.setItem("client",clientresult.data);
parent.location = "acceuilClient.html";
})
here's the second function in the seconde page :
var user;
$scope.display = function()
{
user = window.localStorage.getItem('client');
alert("amal "+user.idclient);
}