[英]How to check the values in sessionStorage in angular?
How we can check the values in session storage?我们如何检查 session 存储中的值? I mean, if i need to check what are the values stored in Session storage, how we can check that?我的意思是,如果我需要检查 Session 存储中存储的值是什么,我们如何检查呢?
set the key
and value
like this像这样设置key
和value
sessionStorage.setItem("user-id", userId);
and extract it like this using key
并使用key
像这样提取它
userId = sessionStorage.getItem("user-id")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.