title: Error -1 send parameters using $http.post angular
body: <p>I have a problem when you submit parameters using $ http.post in angular.</p>
  
  <p>I assume it's some sort of error itself have little knowledge of angular , because in jquery work fine.</p>
  
  <p>Request <strong>jquery'javascript</strong></p>
  
  <pre><code>var user = $('#usuariotxt').val();
  var pass = $('#passwordtxt').val();
  
  var login= {
                Usuario : user,
                Password : pass
         };
  
         $.ajax({
  
            type: 'POST',
            url:  'http://190.109.185.138/Apipedro/api/login',
            data: login,
            datatype: 'json'
  
          }).done(function(data) {
  
                  console.log(data);
          });
  </code></pre>
  
  <p>Request <strong>Angular-Javascript</strong></p>
  
  <pre><code>var app;
  
  app = angular.module('AppUPC',[]);
  
  app.controller('Formulario',['$scope', '$http', function ($scope, $http){
  
      $scope.login = function(){
  
          var login = {
              Usuario: $scope.usuariotxt,
              Password: $scope.passwordtxt
          };
  
          console.log(login);
  
          var url, method;
          url = 'http://190.109.185.138/Apipedro/api/login';
          method = 'POST';
  
  
           $http.post("http://190.109.185.138/Apipedro/api/login", {}, 
                      {params: {Usuario:$scope.usuariotxt, Password:$scope.passwordtxt} 
           }).success(function (data, status, headers, config) {
                  $scope.persons = data;
                  console.log($scope.persons);
  
          }).error(function (data, status, headers, config) {
                  $scope.status = status;
                  console.log($scope.status);
          });
  
       };
  
  }]);
  </code></pre>
  
  <p>I have also used many other forms , including the most common</p>
  
  <pre><code> $http({
  
              url: url,
              method: method,            
              data: login,
              headers :{'Content-Type':'application/json'}
  
           })
  </code></pre>
  
  <p>Errors that occur to me are the following</p>
  
  <p><a href="https://i.stack.imgur.com/8cxGw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8cxGw.jpg" alt="enter image description here"></a></p>