Angular $http.post gives Error: Invalid argument. in IE 8

angularjs, internet-explorer

Solution

so... I turns out adding quotes makes IE happy.

This works in Firefox, Chrome, Safari, etc. :

$http.post('/myurl', myNumberVariable)

But fails in IE (8). However, this works in IE 8:

$http.post('/myurl', myNumberVariable.toString())

Didn't get clarification if this was due to angular or the java backend method that was tried to call.

Problem

App works fine in Chrome, Safari, Firefox etc. But in IE the following code gives an error: ``` $http.post('/myurl', 55) .success(...) .error(...) ``` The error: ``` Error: Invalid argument. ``` Happens after `$rootScope.$digest();` in the `$apply` function in `angular.js` Any ideas that could help debugging this mysterious Microsoft Internet Explorer™ error message?

Original source