![Pawel Kozlowski on Twitter: "What if @angular ngOnInit hook could return a destroy function? Experimental PR: https://t.co/yXM7L6ZMFS https://t.co/mYrJQZFZSb" / Twitter Pawel Kozlowski on Twitter: "What if @angular ngOnInit hook could return a destroy function? Experimental PR: https://t.co/yXM7L6ZMFS https://t.co/mYrJQZFZSb" / Twitter](https://pbs.twimg.com/media/FWlHW3fXoAUS8bp.jpg)
Pawel Kozlowski on Twitter: "What if @angular ngOnInit hook could return a destroy function? Experimental PR: https://t.co/yXM7L6ZMFS https://t.co/mYrJQZFZSb" / Twitter
Enea Jahollari 🅰 on Twitter: "A new injectable was introduced called DestroyRef. This makes the injectDestroy() function not depend on private api-s 🎉 takeUntil(this.destroy$) was just made easy ❤️! #angular https://t.co/9qSx2esU0O" /
![javascript - How to Destroy Active Routing Component from another component in angular - Stack Overflow javascript - How to Destroy Active Routing Component from another component in angular - Stack Overflow](https://i.stack.imgur.com/sORAM.png)