Provides a cancel method on promises created by the angular $q service.
0 people use it
Author: trilobyte

Angular Cancelable $q Build Status

Provides a cancel method on promises created by the Angular $q service. It essentially adds a cancel method on the promise interface when asked to wrap a promise. You can use this library to cancel remote requests (well, no truely since the requests themselves are not canceled).

Please note that this library is only useful as long as angular/angular.js#2452 has not made it into the version of Angular you are using.



The cancelable-q provides a single service called cancelableQ. The service has the following public api.


Wraps the given promise into a cancelable promise.


Wrapped promises will have a cancel(reason) method added to them which cancels given promise with an optional reason. The promise will be rejected using the specified reason.

If no reason is specified canceled will be given as rejection reason.


Copyright © 2013 Bert Willems and contributors


This project is licensed under MIT. Refer to license.txt for more information.

comments powered by Disqus
This page was last updated over 5 years ago.