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
Maybe try setting the responseType in the action config, like this:
$resource(url, {}, {
get: {
method: 'GET',
responseType: 'text'
}
});
If that doesn't work you probably need to use transformResponse or an $http interceptor to modify the response before the resource gets a hold of it. See $http docs.