I have a angularjs app which reads json from java when the user is logged in:
$http({ method: 'POST', url: 'ws/login/user', data : user, cache: true })
.success(function (response) {
$rootScope.userInfo = response; // Here I get the json
response = { success : true };
callback(response);
}).error(function (response) {
response = { success : false };
response.message = 'Error.';
callback(response);
});
Everything works fine until I press F5, then the JSON disappears.
How can I keep the data between page loads?