I'm making a http request where i need to send some values with it.
Http request
$http({
           url: 'user_resources/delete.php',
           method: 'POST',
           data: { parent_state: parent_state, course_id: course_id, filename: material_to_delete.material.file_name }
    });
It runs the php file but the $_POST values aren't there. I've also tried to include headers: {'Content-Type': 'application/x-www-form-urlencoded'} in my http request but without any luck. Can somebody help me figure out what I'm doing wrong? 
Thank you in advance!
Update
Controller
app.controller('CourseEditController', ['$http', '$scope','$sessionStorage','$state','$log','Session','api','$filter', function ($http, $scope, $sessionStorage, $state, $log, Session, api, $filter) {
    var course_id = $state.params.course_id;
    var parent_state = $state.$current.parent.name;
    $scope.deleteMaterial = function (idx) {
        var material_to_delete = $scope.course.course_has_materials[idx];
        $http({
            headers: {'Content-Type': 'application/x-www-form-urlencoded'},
            url: 'user_resources/delete.php',
            method: 'POST',
            data: { parent_state: parent_state, course_id: course_id, filename: material_to_delete.material.file_name }
        });
    };
}]);
HTML
<table class="table table-striped b-t b-light" ng-controller="CourseEditController">
   ...
   <tbody>
      <tr ng-repeat="material in course.course_has_materials">
          <td class="l-h-2-5x">{{ material.material.file_name }}</td>
          <td class="l-h-2-5x">{{ material.material.file_type }}</td>
          <td class="l-h-2-5x text-right pointer">
             <i class="fa fa-times" ng-click="deleteMaterial($index)"></i></td>
      </tr>
   </tbody>
</table>
