jdmarshall's public fiddles
-
XOR problem
jQuery 2.1.3, HTML, CSS, JavaScript
-
Typical asynchronous example
No-Library (pure JS), HTML, CSS, JavaScript
-
Wait for multiple promises
$q.all()
-
Resolved promises can still fire
If you call then() on a resolved promise, your function still gets called.
-
resolve() fires asynchronously
resolve() is processed by a queue, not on the call stack
-
Multiple then() calls fire in order
Because each then() returns a new promise, original order is preserved.
-
Can't watch a promise
scope.$watch doesn't like promises
-
Can't bind a promise
using a bind in the template doesn't work
-
Promise.then() creates a new promise
No-Library (pure JS), HTML, CSS, JavaScript
-
Promises only fire once
Can't resolve() a promise a second time, nothing happens