Category "rxjs"

Is there a way to import rxjs into a plain js web custom component?

I'm trying to create web custom components using plain js. I would like to use rxjs and observables to fetch json content from a REST endpoint that I am also cr

How to make an rxjs marble sync grouping only take up one frame

According to https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/testing/marble-testing.md#marble-syntax '--(abc)-|': on frame 20, emit a, b, a

Property 'filter' does not exist on type 'unknown' Observable<Course[]> in Rxjs 6

As I'm trying to use filter like this. beginnerCourses$: Observable<Course[]>; advancedCourses$: Observable<Course[]>; ngOnInit() {

How to unit-test a valuechange of mat-autocomplete filtered search result in Angular?

I use the mat-autocomplete functionality for searching in projects and want to test if entering a search string, which cannot be found in the project list, lead

How do I get the last value from a ReplaySubject?

Below is a snippet that describes what I'm trying to do. In my application I have a replaysubject that's used throughout. At a certain point I want to get the

How to make one Observable sequence wait for another to complete before emitting?

Say I have an Observable, like so: var one = someObservable.take(1); one.subscribe(function(){ /* do something */ }); Then, I have a second Observable: var

Reconnecting a websocket in Angular and rxjs?

I have a ngrx/store (v2.2.2) and rxjs (v5.1.0) based application that listens to a web socket for incoming data using an observable. When I start the applicati

How to do something conditionally with Observables before subscribe?

I'm trying to implement a solution that execute the following steps: Check if a condition is valid with a filter. Check if Ctrl is pressed and execute some fun

RxJS pipe to filter into 2+branches

Let's assume we have a Subject, that can return a given set of values, all of which might require a different approach to them. We could debate whether or not t

How can I use RxJS to generate a requestAnimationFrame loop?

My goal is to create an animation loop à la requestAnimationFrame so that I could do something like this: animationObservable.subscribe(() => { /

BehaviorSubject vs Observable?

I'm looking into Angular RxJs patterns and I don't understand the difference between a BehaviorSubject and an Observable. From my understanding, a BehaviorSubj

Angular EventEmitter in merge()

I made a component that shows a list of data-items which can be changed either by pageSelection, sortOrder or filterChanges. This is the code: import { EventEmi

Filter undefined from RxJS Observable

Is there a specific idiom or utility used to filter undefined from RxJS observables? This code has the behavior I want: obs.pipe(filter(x => x !== undefined)

Filter undefined from RxJS Observable

Is there a specific idiom or utility used to filter undefined from RxJS observables? This code has the behavior I want: obs.pipe(filter(x => x !== undefined)

Angular/RxJS When should I unsubscribe from `Subscription`

When should I store the Subscription instances and invoke unsubscribe() during the ngOnDestroy life cycle and when can I simply ignore them? Saving all subscrip

Loading indication with a delay and anti-flickering in RxJS

I want to implement loading indication using RxJS (version 6). A loading indicator (a spinner) would be shown in a component before asynchronous data call finis

Loading indication with a delay and anti-flickering in RxJS

I want to implement loading indication using RxJS (version 6). A loading indicator (a spinner) would be shown in a component before asynchronous data call finis

Loading indication with a delay and anti-flickering in RxJS

I want to implement loading indication using RxJS (version 6). A loading indicator (a spinner) would be shown in a component before asynchronous data call finis

Loading indication with a delay and anti-flickering in RxJS

I want to implement loading indication using RxJS (version 6). A loading indicator (a spinner) would be shown in a component before asynchronous data call finis