Finally I used a http interceptors, setting a timeout.

function requestTimeoutInterceptor() {
        var TIMEOUT = 30;
        
        return {
            'request': function (config) {
                config.timeout = (1000 * TIMEOUT);
                return config;
            }
        };
    } 



Thanks!!!

El martes, 21 de abril de 2015, 20:59:58 (UTC+2), Mo Moadeli escribió:
>
> The best way to do this is using promises.  When your $http call's back 
> after timing out, the particular promise success/fail fucntion will be 
> called.  This is the stabdard and best way to handle most asynchronous 
> $http/ajax calls.  Let me know if you need an example.
>
> On Tuesday, April 21, 2015 at 3:41:36 AM UTC-4, Antonio Gil wrote:
>>
>> Hi!!
>>
>> How I can show message when a http request is run and the server not 
>> responding?
>>
>> Basically, How I can handle the timeout for all http requests?
>>
>> Thanks and Greetings!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to