angular request interminnent

Why angular would return request data whenever it wants and most of the time it doesn't at all. When I'm testing, running the web server on my local machine works beautifully, after deployed to the server stopped working.

$scope.request = $resource('/FooData/getData', {
            ajaxCall: true,
            callback: 'JSON_CALLBACK'
        }, {
            get: {
                isArray: true
            }
        });

Fiddler says there's nothing wrong with the request url, and when you send the same query manually from the browser's address bar - it works and returns JSON, although when it gets called from javascript it makes the call, but returns no results (you can see it in Chrome console's Network Tab). Sometimes though it gets the result, I noticed that only happens with very first run of the app. After that no matter how many times you refresh the page, it won't get any data.

It's not cross-domain call, but even if I set method:'JSONP' that still doesn't work

Not sure what is going on in your project. But here is the working plunker: http://plnkr.co/edit/ClUYpH

It seems to be working even for the 2nd get call.

One thing I noticed is that you need to specify method = 'GET' in your actions property, otherwise method becomes undefined.