How do I proxy DOM namespaces in AngularJS?
I have some directives that bind mouse events to a document:
$document.on('mousemove');
$document.on('mouseup');
After mouseup, I do:
$document.off('mousemove');
$document.off('mouseup');
And then some other directives do not work, because the events were destroyed.
The Angular documentation for angular.element says:
on() — Does not support namespaces, selectors or eventData
Well, but I think I need event namespaces to indicate which events to delete. So what should I do?
source
share