This is my Angular js Function
$scope.submitform = function () {
$http.post('http://localhost:90/vendor/dashboard/accountinfosave/',
{'uname': 'vikrant', 'pswd': '111', 'email': 'bhallavikrantvir@gmail.com'}
).success(function(data) {
alert("success");
}).error(function(data) {
alert("error occured");
});
};
This is my Zend Framework Controller Function .
public function accountinfosaveAction(){
$data = $this->getRequest()->getPost();
print_r($data);// not working
print_r($_POST);// not working
}
The problem is I want to access the data(uname,pswd,email
) I sent from Angular Js using $http.post
function to zend framework .
If I use $.ajax
function it works fine . But $http.post
Does not work .
Please help me out.