observable Questions

7

Solved

i need your help, i'm trying to display some datas from my firebase but it trhows me an error like InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'. There is my service: import { In...
Claudieclaudina asked 1/7, 2017 at 23:5

2

Solved

After investigating for several days(!?!) for a huge memory leakage of my current Angular2 application, I came up with the new discovery: Apparently, an async pipe, which was heavily used througho...
Blavatsky asked 1/6, 2016 at 21:10

3

Solved

Using RxJS v6 is challenging to retrieve data from sub collection for every item in the loop. There is no way to iterate throw array that is retrieved from HTTP call. Merge map does it only for sin...
Redskin asked 4/4, 2019 at 13:3

3

Solved

How can I combine the following subscriptions into one? this.form.get("type").valueChanges.subscribe(() => { this.calcFinalTransports(); }) this.form.get("departure").valueChanges.subscribe...
Tuxedo asked 12/12, 2017 at 20:31

5

Solved

I'm working on an activity where users are allowed to filter their search results. Initially, I fetch all data but when the user wants to filter it, I need to call another query and update the vie...
Pelerine asked 1/9, 2018 at 23:12

4

I am using @ngneat/until-destroy this npm package to auto unsubscribe observables. I have used checkProperties: true to auto unsubscribe observables. But, I am not getting how to test it. Whether o...
Gernhard asked 4/5, 2020 at 13:48

8

Solved

In an angular application we have ngOnDestroy() lifecycle hook for a component / directive and we use this hook to unsubscribe the observables. I want to clear / destory observable that are create...
Digitalize asked 26/8, 2017 at 19:27

3

I want to wait for one function to finish before executing the function next to it. I have one function called getData() in which http call occurs which returns an observable. The second function c...
Monika asked 28/7, 2020 at 14:52

6

Solved

In component : singleEvent$: Observable<Event>; On init, I get observable this.singleEvent$ = this._eventService.events$ .map(function (events) { let eventObject = events.find(item =&gt...
Vaden asked 3/6, 2016 at 6:22

4

Situation: I am using FirebaseObjectObservable to populate my Ionic 2 (rc0) template. Template code: <ion-card-content> <p>{{(course | async)?.description}}</p> <br> &l...
Rebekah asked 4/10, 2016 at 17:38

5

Solved

I am starting my project with Angular2 and the developers seem to recommend RXJS Observable instead of Promises. I have achieved to retrieve a list of elements (epics) from the server. But how can...
Sanious asked 23/6, 2016 at 12:32

9

Solved

I would like to find a way to test unsubscribe function calls on Subscriptions and Subjects. I came up with a few possible solutions, but every one of these have pros and cons. Please keep in mi...
Seurat asked 21/9, 2018 at 10:5

22

I am trying to map from a service call but getting an error. Looked at subscribe is not defined in angular 2? and it said that in order to subscribe we need to return from inside the operators. I h...
Bipetalous asked 21/4, 2017 at 17:59

2

Solved

I was using EventEmitter and @Output in Angular services, today one of the colleagues mentioned it's not a good practice. I found this post mentioning it's a bad practice and it seems mostly is per...

1

Solved

I am new to nestJs, Now I need to implement the sse in nestJs, In nestJs they have the special decorator called @Sse to establising the sse connection between the clients and server. If I use this ...
Excursive asked 1/3, 2023 at 17:56

2

Solved

I am pretty new to Observables. How would I create Observable just from a simple string? Then subscribe to it and output it when it changes. Does that make sense? I don't have any luck with goog...
Surber asked 22/2, 2016 at 14:54

4

Solved

I have the following code inside my constructor: this.searchResults = this.searchTerm.valueChanges .debounceTime(500) .distinctUntilChanged() .switchMap(term => this.apiService.search({ lim...
Dory asked 20/2, 2017 at 0:19

2

I have seen three ways to "listen" for changes to a value via an observable / call APIs to fetch data from the backend. One of these ways has "next:" : this.MySubscription = thi...
Gracie asked 14/2, 2023 at 14:8

12

Solved

I'm struggling to create a countdown timer using Observables, the examples at http://reactivex.io/documentation/operators/timer.html do not seem to work. In this specific example the error related ...
Hilleary asked 21/1, 2016 at 10:45

3

Solved

I had this code return this.http.get(this.pushUrl) .toPromise() .then(response => response.json().data as PushResult[]) .catch(this.handleError); I wanted to use observable instead of Pro...
Unmannerly asked 17/8, 2016 at 10:18

4

Solved

I have been getting the following error message when trying to apply the switchMap operator to my Observable: Property 'switchMap' does not exist on type 'Observable'. I'm currently using rxjs...
Publicly asked 19/2, 2018 at 20:32

3

Solved

I have a use case whenever a new request is triggered, any http requests that are already in flight should be cancelled / ignored. For eg: A request (say #2) comes in while the request #1 t...
Competitive asked 28/2, 2018 at 18:17

7

Solved

Why is the view not being updated when a variable changes within a subscribe? I have this code: example.component.ts testVariable: string; ngOnInit() { this.testVariable = 'foo'; this.someSe...
Exquisite asked 24/5, 2018 at 22:45

2

I'm going through RxJS from sometime and i can't seem to understand why do we call RxJS Subject as Multicast and Observable as Unicast. I understood that Subject is capable of emitting data using ...
Cortney asked 13/7, 2019 at 15:48

3

Solved

I have a view and a viewModel that should update the ListView when users are added to the user array. I can verify that users are being added, yet the ObservedObject is not updating. I have a searc...
Ens asked 15/8, 2020 at 15:19

© 2022 - 2024 — McMap. All rights reserved.