bluebird 3.3.3, Chrome 48, angular 1.5.0
Example in this fiddle: https://jsfiddle.net/Lmac0kLw/5/
When using promisify on an async function, it appears that setScheduler is not called when the promise resolves. In my jsfiddle, I use angular to update the text to HelloWorld, but it does not change.
There are a few ways to remedy this:
- Add a
$scope.$apply(); which obviously defeats the purpose of setScheduler.
- Use a normal promise in place of
pAsync:
Promise.resolve()
.then(function() {
$scope.hello = 'HelloWorld';
});
As I understand it, there should be no difference between the promisified call vs the normal promise. Is this an actual bug? Or am I not understanding something?
bluebird 3.3.3, Chrome 48, angular 1.5.0
Example in this fiddle: https://jsfiddle.net/Lmac0kLw/5/
When using promisify on an async function, it appears that
setScheduleris not called when the promise resolves. In my jsfiddle, I use angular to update the text toHelloWorld, but it does not change.There are a few ways to remedy this:
$scope.$apply();which obviously defeats the purpose ofsetScheduler.pAsync:As I understand it, there should be no difference between the promisified call vs the normal promise. Is this an actual bug? Or am I not understanding something?