title: Angular JS AJAX Call with Parameters
body: <p>without the parameters of the method Get, the code works, but if the method asks for a parameter an error 404 is returned. How do I properly send parameters with Angular JS?</p>
  
  <pre><code>factory.test = function () {
      var q = $q.defer();
  
      $http({
          method: "GET",
          url: url + "/dataEntry/test",
          data: {
              sampletext : "sample"
          }
      })
          .success(function (data, status, headers, config) { 
              q.resolve(data);
          })
          .error(function (data, status, headers, config) { 
              q.reject(data);
          });
  
      return q.promise;
  }; 
  </code></pre>
  
  <hr>
  
  <pre><code>    [Route("test")] 
      public String Get(string sampletext)
      { 
          return "Reply coming from data entry controller" + sampletext; 
      }
  </code></pre>