Sha256: 6e057e5d7c29374d49f9bade07aa3a8224d8c9290667c64f7df3859f978d2f77
Contents?: true
Size: 494 Bytes
Versions: 20
Compression:
Stored size: 494 Bytes
Contents
import {Module, DirectiveObject} from 'a1atscript'; @Module('signOutDirective', ['ng-token-auth', 'ui.router.state']) @DirectiveObject('xngSignOut', ['$state', '$auth']) export default class SignOut { constructor($state, $auth) { this.$state = $state; this.$auth = $auth; this.restrict = 'A'; } link(scope, element, attrs) { element.on('click',() => { this.$auth.signOut().then((response) => { this.$state.go('root.homepage.show'); }); }); } }
Version data entries
20 entries across 20 versions & 1 rubygems