observable Questions

2

Solved

I have some trouble to understand this. When I use the switchMap operator with an Observable it emits all the values as expected: Observable.from([1, 2, 3, 4, 5]) .do(console.log) .switchMap(i =...
Bricabrac asked 17/2, 2018 at 16:32

2

Solved

Now that mergeMap is deprecated, and the source has this comment in it: /* @deprecated resultSelector no longer supported, use inner map instead */ How do I use an "inner map" instead? I guess t...
Olympiaolympiad asked 11/6, 2018 at 23:57

5

Solved

I am building a service which exposes an Observable. In this service I receive external function calls which should trigger a next call on the Observable so that various consumers get the subscribe...
Pilloff asked 25/1, 2017 at 18:42

5

Solved

I have series of methods which are dependent on completion of other methods. process1(data: string) : Observable<string> { this.dataservice.process(data).subscribe( (response) => { re...
Mccaskill asked 27/7, 2017 at 15:21

5

I want to pass a value to the child component. this value is an Observable, so I use async pipe. <child [test]="test$ | async"></child> test$ is just a normal observable variable, th...
Torre asked 8/5, 2020 at 14:17

2

Solved

Mobx supports both @observable and @observable.ref modifiers and their official doc says observable: This is the default modifier, used by any observable. It clones and converts any (not yet obse...
Platinize asked 14/11, 2019 at 6:39

2

Solved

Is there a way to just tell the server to update data without subscribing? Skipping a return statement and a subscription seems to render the http call inert. In my case, my DB guy created a bunch...
Bunt asked 29/7, 2016 at 16:22

11

Solved

Say I have an Observable, like so: var one = someObservable.take(1); one.subscribe(function(){ /* do something */ }); Then, I have a second Observable: var two = someOtherObservable.take(1); ...
Mirabel asked 29/5, 2015 at 1:21

0

I'm getting an unwanted behavior/flaw when passing a list of Observable Network calls to Observable.Zip(), similar to this accepted answer: How to make multiple request and wait until data is come...
Straub asked 16/4, 2022 at 0:2

1

My Nodejs application using knex breaks after inserting few records into the Postgres database with the following error: Unhandled rejection Error aborted at PendingOperation.abort (/mnt/c/Users/...
Snob asked 10/6, 2018 at 12:13

1

Solved

Take these examples : <ng-container *ngIf="vo$ | async; let vo"> and <ng-container *ngIf="vo$ | async as vo"> They have the same purpose, getting the latest value ...
Neslund asked 25/3, 2022 at 13:37

1

Solved

After upgrading to NestJS v8, I had to upgrade my RxJS version as well from 6 to 7 then it started throwing ERROR [ExceptionsHandler] no elements in sequence error. This is a sample method in one o...
Transform asked 24/3, 2022 at 18:28

1

Simple Component Example: export default function App () { const videoRef = useRef(); const onScreen = useOnScreen(videoRef, "-300px"); // hook for play/pause based on visibility &lt...
Scoggins asked 27/6, 2021 at 15:49

4

I have the following situation using Observables in my Angular4 app that I just can't get to work: I want to gather summary data of all my booking days for a overview page. Getting all the days is ...
Velocity asked 25/12, 2017 at 22:47

3

Solved

I'm going to use Angular2 to receive websocket incoming messages and update a webpage based on those received messages. Right now, I'm using a dummy echo websocket service and will replace it. Fro...
Henn asked 25/4, 2016 at 21:24

3

Solved

I'm creating a component that displays validation errors under input fields. If there is an error message shown, and the user submits the form I want to flash the message to draw their attention. ...
Syllabism asked 8/7, 2017 at 1:11

4

Solved

I am using angular 2 common http that return an Observable, but I face with a problem that my code likes a mesh when I use nested Observable call: this.serviceA.get().subscribe((res1: any) => ...
Trainee asked 1/4, 2018 at 9:25

2

I have a slide-show component that has an Input array of slide objects and shows each one as long as it's been defined in slide.time of itself. also there are two buttons that clicking them has to ...
Sell asked 28/4, 2017 at 7:10

4

Solved

I have an Angular component that listens for a route parameter for a user id to change and when it does it loads the user details. The user details takes a few seconds to return data from the API. ...
Ause asked 13/12, 2018 at 18:1

1

Solved

How do I convert an Android lifecycle callback to a RX Observable? For example, onNewIntent. I could make my Activity itself a custom Observable, calling onNext for a bunch of Observers within onNe...
Kerouac asked 26/1, 2022 at 16:3

4

Solved

Service module: import { Observable } from 'rxjs/Rx'; import { Http,Response} from '@angular/http'; import { Injectable } from '@angular/core'; import 'rxjs/add/operator/Map'; @Injectable() export...
Dori asked 21/5, 2017 at 0:22

7

Here is my code. import { injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/catch'; @Injectable({ providedIn: 'root' }) export class PostsServic...
Kerch asked 11/5, 2018 at 11:40

6

Solved

I'm looking for a plain English explanation of what an Observable is in RXJS. What it can be used for, and any useful explanations either video links, tutorials, use cases, examples, or anything r...
Quechuan asked 24/9, 2018 at 0:39

7

Solved

I'd like to be able to await on an observable, e.g. const source = Rx.Observable.create(/* ... */) //... await source; A naive attempt results in the await resolving immediately and not blocking...
Heger asked 9/12, 2015 at 22:40

2

Solved

I'm facing with a very strange behavior on my project, I have a simple Angular service with the below code: seatClick$ = new Subject<Seat>(); and a method on the service that fires the obs...
Zamia asked 18/5, 2020 at 10:20

© 2022 - 2024 — McMap. All rights reserved.