registration.controller.js 495 B

1234567891011121314151617181920212223
  1. (function() {
  2. 'use strict';
  3. app.controller('Registration', [
  4. '$scope',
  5. 'account.repository',
  6. '$uibModalInstance',
  7. function($scope, accountRepository, $uibModalInstance) {
  8. $scope.user = {
  9. login: '',
  10. email: '',
  11. password: ''
  12. };
  13. $scope.submitRegistration = function() {
  14. accountRepository.registration($scope.user).then(function(response) {
  15. console.log('response', response);
  16. $uibModalInstance.close(true);
  17. }, function(error) {});
  18. }
  19. }]);
  20. })();