is it somehow possible to listen to a WebSocket inside a service, and make that service "reactive" by listening to messages from sockets and then sending the changes to my other components, e.g by observables?
It should of course work over different tab/browser instances.
What is the correct pattern? And if I use the service in another angular component, do I need to somehow initialize it first, or is it enough to import the dependency inside my component, because there is no ngOnInit method in services?
I would probably create my socket listener in the service constructor and then next new events with observables. But, not sure exactly how.!