I am using the Angular $resource to make requests to my controllers, implemented on a Spring application. When the controller returns just an Integer value, $resource parse
I've actually found this to be an issue with integers, strings, and bools.
If you are using WebAPI, do something like this:
public object ControllerMethod() { return new { value = }; }
If Node, use CodeLander's answer.
In your Angular code, you'll just have to get the .value of what's returned.