Sha256: 24a94f2547e6e79a75f27d0d123e50e5ab1616057d75a57f7410c9c125ea58bd
Contents?: true
Size: 780 Bytes
Versions: 19
Compression:
Stored size: 780 Bytes
Contents
import {Controller} from 'a1atscript'; @Controller('RegistrationsCtrl', ['$scope', '$auth', '$state', '$xngToast', 'Serializer']) export default function RegistrationsController( $scope, $auth, $state, $xngToast, Serializer) { $scope.registration = { email: '', emailConfirmation: '', password: '', passwordConfirmation: '' }; $scope.registrationSubmit = function() { var serializer = new Serializer(); $auth.submitRegistration(serializer.serialize({user: $scope.registration})) .then(function(resp) { $state.go('root.inner.registrationsSuccess'); }) .catch(function(resp) { $xngToast.errorList(resp.data.errors, "We cannot process your registration because:"); // handle error response }); }; }
Version data entries
19 entries across 19 versions & 1 rubygems