concept rxjs in category angular
appears as: RxJS, rxjs, The RxJS,
RxJS

This is an excerpt from Manning's book Angular Development with Typescript, Second Edition.
Listing 6.5. asyncpipe/app.component.ts
import {Component} from '@angular/core'; import 'rxjs/add/observable/interval'; import {take} from 'rxjs/operators'; import {Observable} from "rxjs"; @Component({ selector: "app-root", template: `{{numbers$ | async}}` #1 }) export class AppComponent { numbers$: Observable<number> = Observable.interval(1000) #2 .pipe(take(10)); #3 }
RxJS offers an implementation of the WebSocket service based on the Subject explained in section D.6 in appendix D. The RxJS Subject is both an observer and observable. In other words, it can receive and emit data, which makes it a good fit for handling WebSocket data streams. The RxJS WebSocketSubject is a wrapper around the standard browser WebSocket object and is located in the rxjs/websocket file.