In the Angular $http
docs, it mentions that you can set the 'timeout' config to either a number or a promise.
timeout – {number|Promise} – timeout in milliseconds, or promise that should abort the request when resolved.
But I am not sure how to make this work using a promise. how do i set a number and a promise ? Basically I want to be able to know whether an http call (promise) errored due to a 'timeout' or something else. I need to be able to tell the difference. Thanks for any help !!!