TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sanjit Kumar Singh
NA
4.5k
223k
How to manage a session for a website in Angular?
May 25 2018 2:25 PM
User should not be able to access any thing after session expired.
Reply
Answers (
3
)
3
Bryian Tan
0
9.7k
1.6m
May 25 2018 10:58 PM
You can use the sessionStorage API. With sessionStorage, the session will be destroyed when the user close the browser/tab/window.
https://alligator.io/js/introduction-localstorage-sessionstorage/
Accepted Answer
2
Prashanth Kumar
0
270
4.3k
Jun 26 2018 8:06 AM
if you want store the value in session using angular
$window.sessionStorage.setItem("Name","Value")
Destroy the session
$window.sessionStorage.removeItem("Name")
$window.sessionStorage.clear()
1
Sanjit Kumar Singh
0
4.5k
223k
May 26 2018 11:24 AM
Thank You Briyan
Angular 5 data passing
How to Add & Remove CSS Classes dynamically in Angular?