
- 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 - Creation Operator timer
This operator will create an observable that will emit the value after the timeout and the value will keep increasing after each call.
Syntax
timer(dueTime: number | Date): Observable
Parameters
dueTime − The dueTime can be in milliseconds or date.
Return value
An observable that will emit the value after the timeout and the value will keep increasing after each call.
Example
import { timer, range } from 'rxjs'; let all_numbers = timer(10, 10); all_numbers.subscribe(x => console.log(x));
Output

Advertisements