Belal Othman Belal Othman - 1 year ago 73
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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download