Top "Behaviorsubject" questions

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

Give BehaviorSubject initial value - value being an Observable

I know that I cannot give BehaviorSubject an Observable value, but I need a way to solve this issue. On …

angular rxjs observable behaviorsubject
Observables in nestjs - Reading a file asynchronously

I am trying a use case of reading a json file asynchronously and sending it out as a response (as …

node.js rxjs observable nestjs behaviorsubject
Angular 4 - rxjs BehaviorSubject usage in Service

My Service code looks like below - DataService @Injectable() export class DataService { ... private serviceRequestDtoSource = new BehaviorSubject<ServiceRequestDto>(null); …

angular rxjs behaviorsubject
Angular data loss on reload using BehaviorSubject

I'm using a data service to send the user data to the app and display the username in my header …

angular service reload behaviorsubject data-loss
Angular : remove item from BehaviorSubject<any[]>([])

This is a little data service in my Angular5 app. I am trying to add/remove item from an array (…

angular behaviorsubject
Angular 2+ subscribe to observable on change only

So here is the scenario. I have a user service with a BehaviorSubject and a method returning an observable of …

angular observable angular2-observables behaviorsubject
BehaviorSubject with boolean value is not working as intended

I have implemented a simple BehaviorSubject, import {BehaviorSubject} from "rxjs"; class MyWeirdoClass { constructor() {} private st: Subject<boolean> = new …

javascript angular rxjs behaviorsubject subject-observer
Cannot read property 'subscribe' of undefined angular

I have a service UserService that has a method getUsers() and this service is shared among different angular components. The …

angular rxjs observable behaviorsubject
Best way to read and update a value of a BehaviorSubject

since it's well known that use getValue() method on a BehaviorSubject should be avoided link I'm wondering what's the best …

angular rxjs behaviorsubject
Angular2 + RxJS BehaviorSubject subscription not working on all components

I'm trying to make some sort of communication between my components, so I'm using a service with a BehaviorSubject and …

angular rxjs angular2-services behaviorsubject