Top "Behaviorsubject" questions

Use this tag for questions related to a BehaviorSubject, which represents a value that changes over time.

BehaviorSubject vs Observable?

I'm looking into Angular RxJs patterns and I don't understand the difference between a BehaviorSubject and an Observable. From my …

angular rxjs behaviorsubject rxjs-observables
Simple way to get the current value of a BehaviorSubject with rxjs5

Previously in rxjs4 there was a method in the BehaviorSubject called: getValue() (doc here). This method does not exist any …

javascript reactive-programming rxjs rxjs5 behaviorsubject
How to create behavior subject for object and subscribe to it on another component?

I created a behaviour subject in a service class. public personObject: BehaviorSubject<any> = new BehaviorSubject<any>({ …

angular typescript object rxjs behaviorsubject
How to implement behavior subject using service in Angular 8

I'm new to Angular and I'm having an issue. I'm creating an app with several sibling components. When I update …

angular typescript httpclient angular8 behaviorsubject
How to convert an Observable into a BehaviorSubject?

I'm trying to convert an Observable into a BehaviorSubject. Like this: a$ = new Observable() b$ = BehaviorSubject.create(new BehaviorSubject(123), a$) // 🔴 …

javascript typescript rxjs observable behaviorsubject
How to test BehaviourSubject next function?

I am trying to test a service that is using a BehaviourSubject, however I am not exactly sure how. Here …

angular jasmine rxjs behaviorsubject
How to combine multiple rxjs BehaviourSubjects

I'm building out an Angular2 app, and have two BehaviourSubjects that I want to logically combine into one subscription. I'm …

rxjs behaviorsubject
How to implement BehaviorSubject with getter and setter in Angular 2

I'm trying to implement in my LoginService a isLoggedIn boolean value of type BehaviorSubject together with getter and setter functions …

angular typescript getter-setter tslint behaviorsubject
Angular 6 - Behaviour Subject: get data to stay after refresh

I'm trying to pass data between course-detail component and course-play component. I used shared service and BehaviorSubject. The data is …

angular typescript behaviorsubject subject-observer
How to combine multiple Observables together in Angular 2

So I've just started programming with Angular 2 and just got started on learning about subscribe, Subject and BehaviorSubject. Currently I …

angular observable subject behaviorsubject