I'm using a familiar approach where an Angular service has a private Subject
that provides a public Observable
like this:
private exampleSubject = new Subject<number>();
example$ = this.exampleSubject.asObservable();
In my particular situation, it is logical to keep the subject private, but how can I allow multiple subscribers?
In simpler terms, subjects are multicasts while observers are single casts. Is there a way to have a multicast observable without allowing external components to use .next on the subject?