Observable vs Subject and asObservable
I am learning RxJs, I am seeking confirmation or correction on my assumption. I am trying to make a public read only observable in a service that I can use .next() on in various places in my service class. I am wondering if this is the proper way to do it: private myObservable = new Subject<T>(); public myObservable$: Observable<T> = this.myObservable.asObservable(); The user can subscribe to myObservable$ I can use myObservable.next(...); It works perfectly but I am experience enough to know that I may just be being an unwitting idiot (RxJS is huge). Is this correct pattern and correct object