What is the difference between hasPendingMacrotasks or hasPendingMicrotasks within NgZone? The documentation seems to be lacking information. All I know is that they return a boolean. But what exactly are they checking for? What is considered a micro task? And what is considered a macro task?
class NgZone {
static isInAngularZone() : boolean
static assertInAngularZone() : void
static assertNotInAngularZone() : void
constructor({enableLongStackTrace = false}: any)
run(fn: () => any) : any
runGuarded(fn: () => any) : any
runOutsideAngular(fn: () => any) : any
onUnstable : EventEmitter<any>
onMicrotaskEmpty : EventEmitter<any>
onStable : EventEmitter<any>
onError : EventEmitter<any>
isStable : boolean
hasPendingMicrotasks : boolean
hasPendingMacrotasks : boolean
}
My best guess is that micro refers to tasks from within a specific class whereas macro probably refers to a task in regards to the whole application. Can anyone verify or confirm this assumption? Or shed some light on the specifics?
NgZone Docs:
https://angular.io/docs/ts/latest/api/core/index/NgZone-class.html#!#hasPendingMicrotasks-anchor