We will learn how to tackle Codeigniter Angularjs http post not working
Sometimes, you face problem you can't get post data using $this->input->post(), when you fire $http.post() using AngularJS or Jquery.
in following example through you can solve your problem:
public function store()
{
$this->load->database();
$_POST = json_decode(file_get_contents('php://input'), true);
$posts = $this->input->post();
$this->db->insert('posts', $posts);
}