title: sending data to MVC from an angular post
body: <p>We are using angularjs to post a form to an MVC controller to process</p>
  
  <pre><code>$scope.resultsFilter = function () {
      $scope.data = [];
      $scope.data = {
          startdate: $scope.$$childHead.resultfilter.startdate,
          enddate: $scope.$$childHead.resultfilter.enddate,
          frequency: $scope.resultfilter.frequency,
          direction: $scope.resultfilter.direction
      };
  
      var url = '/user/GetResults/';
      $http.post(url, $scope.data).success(function (data, status, headers, config) {
                       if (data.msg != '') {
                           $scope.msgs.push(data.msg);
                       }
                       else {
                           $scope.errors.push(data.error);
                       }
                   }).error(function (data, status) { // called asynchronously if an error occurs
                       // or server returns response with an error status.
                       $scope.errors.push(status);
                   });
  
  };
  });
  </code></pre>
  
  <p>and the MVC controller is :-</p>
  
  <pre><code> [HttpPost]
      public ActionResult GetResults()
      {
  
      }
  </code></pre>
  
  <p>how do we access the data that has been posted by the form?</p>