I created a service for getting SSE(server send events) from backend(Node). When I use this service in one component it's working as expected. But when I try to use in multiple components at very first time ngoninit triggers and loads the data perfectly. When I navigate to one component to another the ngoninit is not triggering and even the services are also not being called. I hope someone can help on this.
Thanks in advance.
Sounds like your components are not removed from the view and therefore not destroyed. Then ngOnInit will not trigger, because an instance of the component already exists