summaryrefslogtreecommitdiff
path: root/client/js/requests/identity.js
blob: aca435f2c03265059b89033b5b7582a2098936fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36




mainApp.controller('identityCtrl', function($scope, $http) {

    $scope.identityFormData = {};

    $scope.processForm = function() {

	  $http({
	  method  : 'POST',
	  url     : 'http://148.60.11.31/',
	  data    : $.param($scope.identityFormData),
	  headers : { 'Content-Type': 'application/x-www-form-urlencoded' } 
	 })
	  .success(function(data) {
	    console.log(data);

	    if (!data.success) {
	      // if not successful, bind errors to error variables
	      //$scope.errorName = data.errors.name;
	      //$scope.errorSuperhero = data.errors.superheroAlias;
	    } else {
	      // if successful, bind success message to message
	      //$scope.message = data.message;
	    }
	  });
   };



});