I looked over and over again an example of how to cancel the current REST call using the Angular $ resource. I haven't found a solution yet, but from the Angular documentation I got the impression that this should be possible.
From the documentation:
Usage : $ resource (url [, paramDefaults] [, actions]);
One of the actions defined in the documentation:
timeout - {number | Promise} - timeout in milliseconds or a promise that should interrupt the request when resolving it.
Does anyone have a working example showing how to use this timeout action with a promise to cancel the current request? Is it possible?
source
share