Sha256: 782d60f19681581bb4a351ac1b6a1c4e47513c1277014c7c3779193cc4a575b1
Contents?: true
Size: 858 Bytes
Versions: 2
Compression:
Stored size: 858 Bytes
Contents
import {Controller} from 'a1atscript'; @Controller('SessionsCtrl', ['$scope', '$auth', '$state', '$lrdToast', 'Serializer', 'authConfig', 'Inflector']) export default function SessionsController( $scope, $auth, $state, $lrdToast, Serializer, authConfig, Inflector) { $scope.session = { password: '' }; $scope.session[authConfig.authKey] = ''; $scope.authKey = authConfig.authKey; $scope.humanAuthKey = Inflector.humanize(authConfig.authKey); $scope.passwordShow = authConfig.recoverable; $scope.sessionSubmit = function() { var serializer = new Serializer(); $auth.submitLogin(serializer.serialize({user: $scope.session})) .then(function(resp) { $state.go('root.inner.sessionsSuccess'); }) .catch(function(resp) { $lrdToast.error(resp.errors); // handle error response }); }; }
Version data entries
2 entries across 2 versions & 1 rubygems