简体   繁体   中英

Angular digest cycle runs on which all events?

In broad sense I know that AngularJS runs digest on AJAX, Mouse, Keyboard($http, ngClick, ngKeyup, ngKeydown) etc events. But there are events which requires developer to inform AngularJS to run digest explicitly.

I want to know precisely which all events are subscribed by AngularJS for auto digest cycle?

I'm not sure what you mean by runs digest with ajax, mouse, keyboard etc... If you mean $http, ngMouseDown etc... i think i would understand better.

Basically any vanilla JS event doesn't run digest. That's why $timeout and other events exists. If you run vanilla js version setTimeout digest is not called.

So i think it's pretty easy to figure out which events require you to use digest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM