How to convert an Observable into a BehaviorSubject?
No need to convert it. Just create a subject and attach observable to it with : obs.subscribe(sub) example: var obs = new rxjs.Observable((s) => {setTimeout(()=>{s.next([1])} , 500)}) //observable var sub = new rxjs.BehaviorSubject([0]) //create subject obs.subscribe(sub) //<—– HERE —– attach observable to subject setTimeout(() => {sub.next([2, 3])}, 1500) //subject updated sub.subscribe(a => console.log(a)) //subscribe to … Read more