- RxJS Tutorial
- RxJS - Home
- RxJS - Overview
- RxJS - Environment Setup
- RxJS - Latest Updates
- RxJS - Observables
- RxJS - Operators
- RxJS - Working with Subscription
- RxJS - Working with Subjects
- RxJS - Working with Scheduler
- RxJS - Working with RxJS & Angular
- RxJS - Working with RxJS & ReactJS
- RxJS Useful Resources
- RxJS - Quick Guide
- RxJS - Useful Resources
- RxJS - Discussion
RxJS - Transformation Operator window
It takes an argument windowboundaries which is an observable and gives back a nested observable whenever the given windowboundaries emits
Syntax
window(windowBoundaries: Observable): Observable
Parameters
windowBoundaries − The argument windowboundaries is an observable.
Return value
It returns an observable of windows.
Example
import { fromEvent, interval } from 'rxjs'; import { window } from 'rxjs/operators'; let btncick = fromEvent(document, 'click'); let sec = interval(5000); let result = btncick.pipe(window(interval(5000))); result.subscribe(x => console.log(x));
Output
Advertisements
To Continue Learning Please Login
Login with Google