We're building an ionic mobile application, and I need to handle resource requests that never return. I was hoping to has some sort of universal timeout for all of my resources (say, bail out if the server doesn't respond within 10 seconds), but I'm not really sure how to proceed. Any of you doing something like this?
--
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 angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/gOfINt2TsW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
{number|Promise} – timeout in milliseconds, or promise that should abort the request when resolved.On Mar 30, 2015, at 1:16 PM, 'Michael Bielski' via AngularJS <ang...@googlegroups.com> wrote:
There is a Timeout option in the $http specs. You pass it in your config.
- timeout –
{number|Promise}– timeout in milliseconds, or promise that should abort the request when resolved.
On Mar 30, 2015, at 1:37 PM, 'Michael Bielski' via AngularJS <ang...@googlegroups.com> wrote:
Your $resource usage should be in a factory/service, so you can declare it globally within that service, or you can put it into another service that houses your utility functions/variables and inject that into your other services.