MCPcopy Create free account
hub / github.com/angular/angular / whenStable

Method whenStable

packages/core/src/testability/testability.ts:246–255  ·  view source on GitHub ↗

* Wait for the application to be stable with a timeout. If the timeout is reached before that * happens, the callback receives a list of the macro tasks that were pending, otherwise null. * * @param doneCb The callback to invoke when Angular is stable or the timeout expires * whicheve

(doneCb: Function, timeout?: number, updateCb?: Function)

Source from the content-addressed store, hash-verified

244 * and no further updates will be issued.
245 */
246 whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {
247 if (updateCb && !this._taskTrackingZone) {
248 throw new Error(
249 'Task tracking zone is required when passing an update callback to ' +
250 'whenStable(). Is "zone.js/plugins/task-tracking" loaded?',
251 );
252 }
253 this.addCallback(doneCb, timeout, updateCb);
254 this._runCallbacksIfReady();
255 }
256
257 /**
258 * Registers an application with a testability hook so that it can be tracked.

Callers

nothing calls this directly

Calls 2

addCallbackMethod · 0.95
_runCallbacksIfReadyMethod · 0.95

Tested by

no test coverage detected