This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): $onDestroy hook not called
Even though the $onInit lifecycle hook is fully supported, the $onDestroy hook isn't. This is unexpected for developers. This change introduces a listener for the $destroy event on the linked scope. See https://docs.angularjs.org/api/ng/type/$rootScope.Scope#event-$destroy This implementation closely resembles the AngularJS internal implementation of the lifecycle hook invokation behavior: https://github.com/angular/angular.js/blob/2b28c540ad7ebf4a9c3a6f108a9cb5b673d3712d/src/ng/compile.js#L3298-L3302 Fixes #11847
- Loading branch information
1 parent
a3c533f
commit 8bb1d98
Showing
2 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters