Belal Othman Belal Othman - 15 days ago 9
AngularJS Question

I want to use session variable to hide display elements in angular js

I want to user the session variable logged to hide and display my angular element
I give value true to this element in my 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

Answer

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.