Skip to content

Instantly share code, notes, and snippets.


Dan Lee danielericlee

  • San Francisco, CA
View GitHub Profile
katowulf / module.simpleLoginTools.js
Last active Mar 3, 2016
A service and several directives based on ng-cloak, which wait for angularFire to finish authenticating--rather than just until Angular bootstraps--before displaying it's content. Handy to get rid of those blips that display when user isn't logged in--oh, wait, now they are.
View module.simpleLoginTools.js
'use strict';
* This module monitors angularFire's authentication and performs actions based on authentication state.
* directives/directive.ngcloakauth.js depends on this file
* Modify ng-cloak to hide content until FirebaseSimpleLogin resolves. Also
* provides ng-show-auth methods for displaying content only when certain login
* states are active.