The component is adding a document.onmousemove event listener using an anonymous function, so it cannot be removed and the component cannot be destroyed.
The event listener is being added here
While debugging our application, I noticed this event listener is being constantly triggered, even after the parent component did not appear on the DOM anymore (which made Angular throw an error).
The component is adding a document.onmousemove event listener using an anonymous function, so it cannot be removed and the component cannot be destroyed. The event listener is being added here While debugging our application, I noticed this event listener is being constantly triggered, even after the parent component did not appear on the DOM anymore (which made Angular throw an error).