1

I am looking for a way to set session and retrieve a session in angular js. I do have an idea in PHP which was

$_SESSION['username'] = "xyz";

but I can't a way in angular. can someone please give me a link to any documents or a small snippet?

Thanx.

2
  • Are you using Angular1.x or Angular2+ ? Commented Jun 15, 2017 at 9:08
  • I am using angular1 Commented Jun 15, 2017 at 9:11

2 Answers 2

0

You can create a service as mentioned under following post to access local storage and can store the data there:

How do I store data in local storage using Angularjs?

Sign up to request clarification or add additional context in comments.

Comments

0

Please go through this http://www.c-sharpcorner.com/UploadFile/jj12345678910/a-simple-localstorage-demo-using-angularjs-and-html-5/

This may be help you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.