In my angular project, I implemented an ngx-contextmenu
.
Within one of my components, the template includes the following code:
<div... [contextMenu]="basicMenu">
<context-menu>.....
</div>
After some time, the component with the context menu is destroyed. However, the context menu remains visible on the screen even after the component is gone!
My query is: How can I ensure that this context menu closes automatically when my component is destroyed?
Thank you for your help!