Skip to content
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
@artaommahe

Description

@artaommahe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions