angular-off-click
angular-off-click copied to clipboard
Remove event listeners avoiding memory leaks
Memory leak caused by event listeners not being removed. I have created a PR fixing the issue: #52
This library doesn't create a new event listener each time the directive is used. It creates 3 listeners (touchmove, touchend and click) once; when the directive is first used/instantiated. These 3 listeners are used to all of the off-click directives; there are only ever 3 event listeners.
Can you create a plunker, jsfiddle, webpackbin, or something showcasing your issue?