This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
component's controller $onDestroy hook is not called on manual $scope.$destroy from inside the controller #14376
Closed
Description
If we call $scope.$destroy()
then $onDestroy
hook never fires, $scope.$on('$destroy')
works well
e.x. watch in console https://jsfiddle.net/artaommahe/agL5zuzf/1/
on parent scope destroy both hooks work well