I am facing a challenge with handling the destruction event of an Angular component in my external module that provides a decorating function. I've run into issues trying to override the ngOnDestroy()
method when it includes references to injected services. Is there a workaround or another way to achieve the same result?
Check out this Plnkr for more information: https://plnkr.co/edit/YtczREB91A3t6rJ1uKks (error related to ngOnDestroy()
should not occur)
If anyone is interested, here is a working version thanks to @estus's suggestion involving the use of Symbol()
: https://plnkr.co/edit/nnxLswhPUGZR3ycBWojg