Sha256: fdcbb3c5930dff79533c736b594cc104b9b42661af2c4e3fdf19c02b6636df71
Contents?: true
Size: 858 Bytes
Versions: 19
Compression:
Stored size: 858 Bytes
Contents
import {Controller} from 'a1atscript'; @Controller('SessionsCtrl', ['$scope', '$auth', '$state', '$xngToast', 'Serializer', 'authConfig', 'Inflector']) export default function SessionsController( $scope, $auth, $state, $xngToast, 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) { $xngToast.error(resp.errors); // handle error response }); }; }
Version data entries
19 entries across 19 versions & 1 rubygems