Closed lifenautjoe closed 7 years ago
Do you mean https://github.com/ysmood/yaku#yakunexttick?
Yaku is more flexible than Bluebird, except the async scheduler, you can also set your own Symbol, Species, etc. Bluebird cannot do that.
Sadly with no scheduler, I found no way to make it work.
Are you sure you understand what I said? I said please check the nextTick
API of Yaku, it's the same with Bluebird's setScheduler.
const Promise = require('yaku')
Promise.nextTick = function(fn) {
$rootScope.$evalAsync(fn);
}
Oh, no I didn't, thought you meant there was none with the "Yaku is more flexible than Bluebird, except the async scheduler". Will try it out. Thanks.
Never came back to this. It works, thanks!
Bluebird provides the Promise.setScheduler method to bind with the angular digest cycle.
Can the same thing be achieved with Yaku?