Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var vm = angular.module('app', []).controller('RegisterController', function ($http, $scope) {
  2.     var vm = this;
  3.     $scope.passInputMessage='dd';
  4.  
  5.     $scope.changePassInputValue=function ($scope) {
  6.         this.$scope;
  7.         $scope.passValue='hasła się nie zgadzają';
  8.         return $scope.passValue;
  9.  
  10.     };
  11.     vm.addUser=function (characters) {
  12.  
  13.         if (characters.password === characters.rePassword) {
  14.             $http({
  15.                 method: 'POST',
  16.                 url: 'api/user',
  17.                 data: characters
  18.             })
  19.         } else {
  20.             changePassInputValue($scope.passInputMessage);
  21.  
  22.  
  23.  
  24.         }
  25.  
  26.     }
  27.  
  28.  
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement