By default angular encodes data to Content-Type: application/json
but you want it to be Content-Type: x-www-form-urlencoded
. The later is set to default by jQuery post
, thats why most of the newcomers fall into that trap.
So you have to set the content type before you do the request.
yourApp.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
}]);
Now before every http request, the content type is changed to what we set above.
Same topic is been discussed in this post.