I'm using Angular 2+.
As part of a ngOnDestroy for a component, I'd like to destroy/delete a service instantiation.
Is this possible?
Anyone know how?
And also of course, the next time the component is loaded, I'd like to recreate the service and then destroy when the component dies.
Edit:
What I'm trying to achieve is a dedicated web socket per component. And when a component gets destroyed (ngOnDestroy), to disconnect the websocket.