ObjectUnsubscribedError when trying to prevent subscribing twice
问题 I have a Service and a component that uses it: PagesService PagesListComponent In the PagesService I have an array of Pages . I notify changes in the array via a BehaviorSubject which both of them are subscribed to. The PagesService are provided at bootstrap , to have just one instance shared. That's because I need to keep the array, instead of downloading the pages everytime they are needed. The code is the following: pages.service.ts import { Injectable } from '@angular/core'; import {