Per-scope promise proxy for Angular
1 person uses it
Author: 4052422?v=3 myplanet
Submitted by: 50832?v=3 atesgoral


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.

Demo and documentation

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