Codeigniter Angularjs http post not workingBy Hardik Savani | February 22, 2016 | | 1303 Viewer | Category : PHP jQuery AngularJS Codeigniter
Share this post:
Sometimes, you face problem you can't get post data using $this->input->post(), when you fire $http.post() using AngularJS or Jquery. I also face this issue, i can't receive post value when i fire $http.post in AngularJS, But i found how to receive post data or json data in Codeigniter controller. in following example through you can solve your problem:
public function store()
$_POST = json_decode(file_get_contents('php://input'), true);
$posts = $this->input->post();
- How to set multiple selected value in Chosen Jquery Plugin?
- Angular $scope.form value undefined on submit in ionic framework.
- How to implement infinite ajax scroll pagination in Laravel 5?
- Solve - Installation request for guzzle/guzzle in laravel
- How to create custom facade in laravel 5.2?
- Laravel 5 - Google reCaptcha code and Validation example using anhskohbo/no-captcha package
- Laravel 5 client side validation using Parsley.js example
- AngularJS - simple image upload with preview example in PHP