I am using the below event listener in my custom directive code to execute certain logic once that event is triggered.
element.on("change", function(e) {
//Logic goes here
}I want to know whether do we need to manually destroy these listeners or will angular destroys these listeners. If we need to manually remove, Could you help me how to remove these event listeners.?
$destroy- AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM element before it is removed.