Sha256: fabb32bcf5944f3ca8a37939f429d9fd20688095227766adf3ffb2edd856eac2
Contents?: true
Size: 432 Bytes
Versions: 21
Compression:
Stored size: 432 Bytes
Contents
export default class OnLoginDirective { constructor($rootScope, $auth) { this.$rootScope = $rootScope; this.$auth = $auth; this.onLogout(); this.$auth.validateUser().then((user) => { this.onLogin(user); }); this.$rootScope.$on('auth:login-success', (ev, user) => { this.onLogin(user); }); this.$rootScope.$on('auth:logout-success', (ev, user) => { this.onLogout(); }); } }
Version data entries
21 entries across 21 versions & 1 rubygems