angular / zone.js

Implements Zones for JavaScript
https://github.com/angular/angular/tree/master/packages/zone.js/
MIT License
3.25k stars 408 forks source link

How to ignore on properties with lazy loaded library #1137

Closed egaoneko closed 6 years ago

egaoneko commented 6 years ago

I lazily load some libraries. I set __Zone_disable_timer = true to ignore setTimeout and setInterval in the lazily loaded libraries and then set __zone_symbol__BLACK_LISTED_EVENTSto ignore custom events in the libraries like pointermove and mousemove. But I think it doesn't work well like under pictures.

How to set ignore with lazily loaded libraries.

JiaLiPassion commented 6 years ago

Please provide a reproduce repo, thanks.

egaoneko commented 6 years ago

@JiaLiPassion ,

I made simple repo. I ask for understanding on slow loading.

I want to ignore things like under pictures.

image

2018-09-20 10 41 06

JiaLiPassion commented 6 years ago

@egaoneko, sorry, the document here https://github.com/angular/zone.js/blob/master/MODULE.md is wrong, it should be

(window as any).__Zone_disable_timers = true;
egaoneko commented 6 years ago

@JiaLiPassion , Thank you for the solution! It's works! I'll close this issue!