Show/Hide all auto-completes multiple times by toggling the value set in *ngIf directive.
Enjoy performance degradation. Each click on the page can takes up to one second or more.
Current behavior
Each click on the page can takes up to one second or more. auto-complete directive listen for click event on document, but doesn't remove the listener on ngOnDestroy.
Expected/desired behavior
Each display of auto-complete should not impact performance of the rest of the application.
Steps to reproduce and a minimal demo
*ngIf
on each auto-complete directive*ngIf
directive.Current behavior
auto-complete
directive listen for click event on document, but doesn't remove the listener onngOnDestroy
.Expected/desired behavior