I am creating a web app in which i want to store userid and role in session through Angularjs
this is my Angularjs file
$http.get('/login.asmx/loginuser', {
params: {
log: $scope.log,
pm: $scope.pm,
password: $scope.password
}
})
.then(function (response) {
{
$scope.suc = response.data;
console.log(response.data);
if (response.data == 'success') {
console.log('success');
$window.location.href = "../welcomepage/welcometable";
}
else
{
console.log('nosuccess');
$window.location.href = "../Login/Index";
}
}
})
i need to store $scope.pm and $scope.log in my session and want to use the same on my welcome page
how to store and use sessions in angularjs?