Skip to main content

All Questions

0 votes
2 answers
1k views

Deleting stored observable value in angular service

I have a observable service: GetInputValueObservableService: private inputObservable = new BehaviourSubject<string>(null); setObservable(text) { this.inputObservable.next(text); } ...
Luckyy's user avatar
  • 1,031
0 votes
1 answer
36 views

Running code regardless of observables existing, but waiting for them if they do?

I have the following code: array1.foreach(a => { if (a === whatever) { function1.subscribe(); } }); array2.foreach(b => { if (b === whatever) { ...
Alisson Campos's user avatar
1 vote
1 answer
949 views

Observable/BehaviorSubject not working in different modules of Angular

I have 1 feature module (Fund module) that displays fund data in one of its components and an AppModule that displays Advisor data. Fund data and Advisor data have one to many relationship. Fund ...
Pritam Bohra's user avatar
  • 4,309
1 vote
0 answers
706 views

RxJS switchMap operator does not cancel http request

I have been struggling to figure out why the HTTP requests are not been canceled using the switchMap operator. import {Observable, of, Subject, Subscription, timer} from 'rxjs'; import {HttpClient} ...
Alex Portnoy's user avatar
0 votes
0 answers
318 views

Angular 10: subscribing to an observable won't fire after a next call

I have a very simple scenario of subscribing to an Observable via an injected FooService: foo.service.ts: @Injectable() export class FooService { private foosSubject = new Subject<...
Shahar Shokrani's user avatar