Does notifyWhenNoOutstandingRequests or an equival

2019-08-15 05:44发布

I have seen this used by test frameworks (for example, Arquillian) to detect when the dom is ready to be examined with Angular 1. Is there an equivalent way to do this in angular 2?

1条回答
放荡不羁爱自由
2楼-- · 2019-08-15 06:16

onEventDone from NgZone should work for that

Notifies subscribers immediately after the final onTurnDone callback before ending VM event.

This event is useful for validating application state (e.g. in a test).

https://angular.io/api/core/NgZone

查看更多
登录 后发表回答