API Docs for:
Show:

RegisterController Class

РЕГИСТРАЦИЯ ПОЛЬЗОВАТЕЛЯ

   angular
       .module('app')
       .controller('RegisterController', RegisterController);

   RegisterController.$inject = ['UserService',  '$location', '$rootScope', 'FlashService'];

   function RegisterController(UserService, $location, $rootScope, FlashService) {
       var vm = this;

       vm.register = register;

       function register() {
           vm.dataLoading = true;
           UserService.Create(vm.user)
               .then(function (response) {
                   if (response.success) {
                       FlashService.Success('Registration successful', true);
                       $location.path('/login');
                   } else {
                       FlashService.Error(response.message);
                       vm.dataLoading = false;
                   }
               });
       }
   }

Item Index

Methods

Methods

register

()

register
СОЗДАЕТ (РЕГИСТРУЕТ) ПОЛЬЗОВАТЕЛЯ
ИНФОРМИРУЕТ О РЕЗУЛЬТАТЕ РЕГИСТРАЦИИ
ПЕРЕХОД НА СТРАНИЦУ АУТЕНТИФИКАЦИИ ( $location.path('/login'); )