Angular 2中是否存在notifyWhenNoOutstandingRequests或等效项? [英] Does notifyWhenNoOutstandingRequests or an equivalent exist in Angular 2?

查看:123
本文介绍了Angular 2中是否存在notifyWhenNoOutstandingRequests或等效项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到测试框架(例如Arquillian)使用它来检测何时可以使用Angular 1来检查dom.是否有等效的方法可以在Angular 2中进行此操作?

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?

推荐答案

中的

onEventDone应该适用于此

在最终的onTurnDone回调之后立即通知订阅者,然后结束VM事件.

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

这篇关于Angular 2中是否存在notifyWhenNoOutstandingRequests或等效项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆