I have been doing some research regarding cookies, sessionStorage, localStorage, but come up with very little insight into $sessionStorage.
Where can I view $sessionStorage in Developer Tools (if one can)? Or is there and alternative, and even better way?
I am using AngularJs' $sessionStorage in my app to assist with user experience, keeping track of filters and dates etc.
I have looked for these parameters under Chrome's Application>>Local Storage, Session Storage Cookies and all other options, but cannot find my APP defines $sessionStorage values. They work though! :D
Update: Here is an example of the usage:
CookiesAlertController.$inject = ['$scope','$http','$sce','$sessionStorage','GetDataService'];
function showAlert() {
if (!angular.isDefined($sessionStorage.cookiesAlertNotificationCount)) {
$sessionStorage.cookiesAlertNotificationCount = 0;
}
if (angular.isDefined($sessionStorage.cookiesAlertNotification)) {
if ($sessionStorage.cookiesAlertNotificationCount === false && $sessionStorage.cookiesAlertNotificationCount > 4) {
$scope.cookiesAlertNotification = false;
}
else {
$scope.cookiesAlertNotification = true;
}
}
else {
$scope.cookiesAlertNotification = true;
}
}
$scope.closeNotification = function () {
$scope.cookiesAlertNotification = false;
$sessionStorage.cookiesAlertNotification = false;
$sessionStorage.cookiesAlertNotificationCount = $sessionStorage.cookiesAlertNotificationCount + 1;
};