Ionic 4 - Observable Subscribe/Unsubscribe Problem Between Some Pages

I have a service that get data from Firebase and show it in Home page. I have tabs and side menu together. When i click a page in tabs and go back to home there is no problem but when i click a non-tab page and go back to home, data is disappeared. I call service at home like that:

  ngOnInit() {
    this.subscription = this.calendarService.getCalendar().subscribe(res => { = res;

This is problematic itself. So i used ngOnDestroy at home page to unsubscribe like that and everything is ok:

  ngOnDestroy() {

I wonder about why i have to unsubscribe because of non-tab pages?

Btw i get classical v4 error at non-tabs pages: router-outlet destroyed

Can Router Outlet problem cause that subscription problem?

Thanks in advance.


if u navigate between child pages, we have a simluare error:

Do u have any solutions?


Unfortunately no. There are lots of discussion on Google but i didn’t see a solution.

Btw i get that error when i go to a child from a tab page. Because tabs use same outlet. Problem is between outlets.

FWIW, framework #15216 looks relevant.