angular-pxy
v1.0.4
Published
Pre-scope promise proxy for Angular
Downloads
3
Readme
angular-pxy
angular-pxy extends scope objects with a $pxy()
method that proxies promises through a Pxy instance that is automatically invalidated when the scope is destroyed. This helps prevent:
- Pending asynchronous operations from causing side effects after the scope in which they were initiated is destroyed (e.g. an HTTP fetch continuing to exercise the backend, then returning a large payload, and then updating an object long after the scope is abandoned).
- The hassle of explicitly cancelling pending operations (e.g. a timeout or interval). Head over to Pxy documentation for a more detailed explanation of the use cases.