Improve this doc View source

ifUserStateKnown
directive in module stormpath

Description

Use this directive to show an element once the user state is known. The inverse of ifUserStateUnknown. You can use this directive to show an element after we know if the user is logged in or not.

Usage

as attribute
<ANY if-user-state-known>
   ...
</ANY>

Example

<div if-user-state-known>
  <li if-not-user>
     <a ui-sref="login">Login</a>
   </li>
   <li if-user>
       <a ui-sref="main" sp-logout>Logout</a>
   </li>
</div>