- i have used angualr js and developing a mini app for crud operation i ma facing issue while i send a post request it shows posted value in fireug console as shown in image1 but while trying to same using $_REQUEST or $_POST it returns blank array
Explanation..
in product.js
app.controller('productsCtrl',function($scope,Data){
$scope.changeStatus=function(product){
$scope.status = {};
$scope.status.status = product.status=='Active' ? 'Inactive' : 'Active';
//Data.put('http://localhost/angularCrud/products.php',$scope.status);
Data.put('http://localhost/angularCrud/test.php',$scope.status);
};
});
in data.js
app.factory('Data',['$http','$location',function($http){
var obj={};
obj.put=function(q,param){ //console.log(data);
//$http.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
successData = $http.post(q,param).success(function(response){
console.log(response);
return response;
});
};
return obj;
}]);
please let me know how to access the posted value of status??