title: AngularJs/webAPI: recieving null in the parameter of webAPI
body: <p>I am using AngularJS and I am trying to send in a json from my service to the webAPI controller. When I send via I recieve null in the parameter in webApi function.</p>
  
  <p>My function service is:</p>
  
  <pre><code>angular.module('productsApp')
      .service('ProductDetailService', ['$http', function ($http) {
          var urlBase = "/api/productdetail";
  
          this.Salvar = function (product) {
              var mydata = JSON.stringify(product);
              debugger;
  
              return $http({
                  method: 'POST',
                  url: urlBase + "/salvar/" + mydata,
                  data: mydata,
                  headers: { 'Content-Type': 'application/json' }
              });
          };
      }]);
  </code></pre>
  
  <p>my code in the webAPI is:</p>
  
  <pre><code>public class ProductDetailController : BaseController
  {
      [Route("api/productdetail/salvar/{item}")]
      [HttpPost]
      public bool Salvar(string item)
      {
          return true;
      }
  }
  </code></pre>
  
  <p>my app.js is:</p>
  
  <pre><code>var app = angular.module('productsApp', ['ngRoute']);
  
  app.config(['$routeProvider', function ($routeProvider)
  {
      $routeProvider.when('/', {
          controller: 'ProductController',
          templateUrl: '/Scripts/App/Html/ProductList.html'
      }).
      when('/testprice', {
          controller: 'ProductController',
          templateUrl: '/Scripts/App/Html/ProductDetail.html'
      }).
      when('/editar/1', {
          controller: 'ProductController',
          templateUrl: '/Scripts/App/Html/ProductDetail.html'
      }).
      when('/api/productdetail/salvar/*', {
          controller: 'ProductDetailController',
          templateUrl: '/Scripts/App/Html/ProductDetail.html'
      })
      .otherwise({ redirectTo: '/' });
  
  }]);
  </code></pre>
  
  <p>The problem in the service is when I am adding to type <code>data: something</code> in  I am recieving in the webService null and I have to add my data in the complet uri, something like:</p>
  
  <p><code>http//.../api/productdetail/salvar/{mydata}</code></p>
  
  <p>using it, it is working. </p>
  
  <p>what is wrong?</p>