title: Access $window.sessionStorage from html
body: <p>In my case I am working with angularjs and I want to access a saved value in <em>user</em> to show or not some html tags.</p>
  
  <p>First it save in some controller the user variable, it is a part of log in action.</p>
  
  <pre><code>$window.sessionStorage.setItem('user', AuthenticationService.getUser());
  </code></pre>
  
  <p>Then, I want to show some html tags depending on the role of that user, with something like the following:</p>
  
  <pre><code>&lt;li&gt;&lt;a id="id" ng-if="user.role=='admin'" href&gt; console &lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I had something similar to this using <em>$rootScope</em>, but when I refresh the page I lose the value. That is why I need to use <em>window.sessionStorage</em></p>
  
  <p>Is there any way to access in html a saved value in sessionStorage? or this is wrong and I need another approach?</p>