Pipe RxJS observable to existing subject

Since Subject is already an observer with methods next(), error() and complete() you can just subscribe it to any Observable:

const fooSubject = new BehaviorSubject(null);

const barSubject = new Subject();
barSubject.subscribe(fooSubject);

barSubject.next('bar');

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)