All Questions
Tagged with angular10 observable
9
questions
3
votes
1
answer
13k
views
Cannot read properties of undefined (reading 'subscribe')
I've been trying to subscribe to a particular observable(i am a beginner to rxjs), but I keep failing.
here is my code
here I need to assign the first element of usergroups array element to this....
0
votes
2
answers
993
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);
}
...
0
votes
1
answer
546
views
How to fetch only a single record of data from a fake public api in angular using observable?
I'm using json placeholder fake api
(https://jsonplaceholder.typicode.com/users).
I need the code (service file and ts file) to get only single record of data.I already fetched the all data from api..
...
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) {
...
0
votes
0
answers
117
views
Angular 10 fails to map object from request to interface correctly
When getting an object wrapped in a Result class I made, the controller and browser dev tools show the response is correct, however when I console log it from the subscription one of the nested values ...
0
votes
1
answer
1k
views
ElementScrolled Event is not being fired with CdkScrollable and mat-side-nav
I have the following DOM Configuration
<div class="sticky-nav-wrapper">
<app-header (notificationClick)="notificationData=$event; sidenav.toggle()"></app-header&...
1
vote
1
answer
938
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 ...
1
vote
0
answers
702
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} ...
0
votes
0
answers
309
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<...