Questions tagged [combinelatest]

137 questions
3
votes
1 answer

How to write Jasmine Unit test case for combineLatest rxjs Angular

mycomponent.ts import { Component, OnInit } from '@angular/core'; import {FormGroup,FormControl} from '@angular/forms' import { DataServiceService } from './data-service.service'; import {combineLatest,Observable,pipe} from 'rxjs'; import {map,tap}…
3
votes
2 answers

How to filter combineLatest to be trigger only when One item changes?

I wrote small demo code as following. I made two PublishSubject of different types. as I change any, page triggers I need to get page trigger only when one changes, which of observable_page. class ViewController: UIViewController { func…
Sam Shaikh
  • 1,596
  • 6
  • 29
  • 53
3
votes
4 answers

Angular - Observables combined result multiple calls

EDIT 30-07-2018 01:57 CET: Still looking for a solution to the problem below: I have the following code: getBoolean(dataRef1, dataRef2) { const myFirstObservable = this.af.object(dataRef1).valueChanges(); const mySecondObservable =…
user9410919
3
votes
0 answers

combineLatest not working

I created a new angular6 project with angularfire2 and rxjs 6. I am debugging the loading bar to be shown while loading observables. my ts code: import { combineLatest, Observable } from 'rxjs'; groups: Observable>; singles:…
BOOnZ
  • 828
  • 2
  • 15
  • 35
3
votes
3 answers

Is there a way to make a signal similar to combineLatest without needing all the signals to initially fire?

I have an array of signals var signals = [Signal]() where enum ActionResult case failed case pending case completed } I want to create a combined signal that returns true if one or more of the signals fires a…
bogen
  • 9,954
  • 9
  • 50
  • 89
2
votes
2 answers

Realtime way to detect push notifcation is enable or not in swift (Combine publisher)

I have a function that checks whether the user has enabled their push notification/ notification alert in the iphone. If the user has turned on their notification, it will print true in the swift view, and if the user has turned off their…
EN_Tech
  • 67
  • 6
2
votes
2 answers

Rxjs combineLatest does returning the observable with in the suscribe

I am trying to get Userid and serviceId after I need to get a call based on the userid,serviceId problem here is it's not returning the observable to the ts. Service.ts function getData():observable{ combineLatest([ …
2
votes
1 answer

combineLatest. continue observables after getting error

I have couple of observables combined in one observable with combineLatest. Also I have one inner switchMap observable that in real example makes an http request to remote server. Now I wonder, how can the combined observable continue working in…
Armen Stepanyan
  • 1,618
  • 13
  • 29
2
votes
0 answers

Is it possible to access piped variables without forkJoin or combineLatest?

Is it possible to access previous pipe variables in RxJs appliances where forkJoin() or combineLatest() cannot be used, in my case due to value accumulation, without nesting pipes? Or is a nested pipe with switchMap() in the following scenario even…
dmuensterer
  • 1,875
  • 11
  • 26
2
votes
2 answers

RXJS combineLatest issue after upgarde 5 to 6

Service.ts file Version 5 code: return this.connectionListStoreService.connections$.pipe( combineLatest(this.isLoadPending$), filter(([connections, isPending]) => !isPending), map(([connections]) => connections), combineLatest( …
BalaDev
  • 193
  • 1
  • 2
  • 11
2
votes
1 answer

RxSwift combineLatest emits all replayed elements from last Observable

I'm seeing some unexpected results when using combineLatest on a collection of cold observables. It emits the latest from all but the last Observable and instead combines the latest from the first (n-1) Observables with each element from the nth…
Dale
  • 3,193
  • 24
  • 29
2
votes
1 answer

CombineLatest Infinite Loop pluck operator

NOTE: I'm calling the set function in a component that has an ngFor. So when I call set function the ngOnInit gets executed multiple times so the set function executes as well multiple times. I have an observable with an object that I update to keep…
AcarMeel
  • 21
  • 3
2
votes
1 answer

combineLatest only emits the data first time

I have the following code block in my ngOnInit as below: this.subscriptions = this.formService.getFormFromApi(this.formId) .pipe( concatMap(theForm => this.formService.getFormStructure(theForm)) ).pipe( take(1), …
2
votes
1 answer

Swift Combine: One publisher consumes another, how to get both streams back out

I'd like some help understanding why my publishers aren't emitting elements through the combineLatest operator. I have a publisher that emits video frames, and another publisher that consumes these video frames and extracts faces from these frames.…
Christina
  • 51
  • 2
2
votes
3 answers

Angular how to use combineLatest to combine routes and queries from website url bar

Im trying to get the route and queries from the url bar. The below code is from a tutorial by CodeWithMosh. I am getting compile error at the combineLatest method. The error is as follow: (property) paramMap: Observable Argument of type '{ …
user3401369
  • 87
  • 1
  • 8
1
2
3
9 10