0

I want to use the session variable logged to hide and display my angular elements I set the value of this element to true in java code.

request.getSession().setAttribute("logged", "true");

I tried the following code

<div ng-show = "${logged}">

but the div is not displayed till I make refresh (F5) to my page
EDIT: I am using spring security with angularjs

3
  • So these are server-side sessions? Commented Nov 23, 2016 at 11:09
  • ok how can I fix this problem (I am new with web applciation development) Commented Nov 23, 2016 at 11:11
  • please provide more information on, how your application work,server side code and client side code. Commented Nov 23, 2016 at 11:39

1 Answer 1

1

i think the proper way required that you should use cookies and localstorage for client side scripting. as the cookies and localstorage have userdefined expiry time.

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

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.