1

I'm fetching the data in all pages through various API calls in my application.

Below is what I've been doing in all the pages of my Ionic app.

this.homeService.getData().subscribe((response: any) => {
  this.results = response.data;
});

I'm making HTTP request, getting response after doing subscription and using that data to display data on views.

Do I need to unsubscribe from all of the observables when I leave the page(s) or route from one page to another? Would it be a performance factor?

coderpc
  • 4,119
  • 6
  • 51
  • 93
  • https://stackoverflow.com/q/35042929/13403499 – Arun Mohan May 09 '20 at 08:05
  • 1
    Does this answer your question? [Is it necessary to unsubscribe from observables created by Http methods?](https://stackoverflow.com/questions/35042929/is-it-necessary-to-unsubscribe-from-observables-created-by-http-methods) – Arun Mohan May 09 '20 at 08:06

0 Answers0