When my page loads I want to make an http call to the server to see if the user's login session is still valid. The client will send a session key with the current timestamp, and server will compare that timestamp to see if it is longer than its specified timeout period. The server will then return either true or false.
If the http call returns true and the login is valid I want to generate this html:
<li><a href='#logout'>logout</a></li>
If the call returns false and the login has expired I want to show the following:
<li><a href='#login'>login</a></li>
I am not sure how to do this with AngularJS.