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