$destroy event is not triggered when angular view is destroyed because “element” is jQuery object.
So, it cause memory leak.
Changed to listen $destroy event on “elem” that is angular element
Then, $destroy event is triggered when angular view is destroyed.
$destroy event is not triggered when angular view is destroyed because “element” is jQuery object. So, it cause memory leak. Changed to listen $destroy event on “elem” that is angular element Then, $destroy event is triggered when angular view is destroyed.