from
Turn an array, promise, or iterable into an observable.
Examples
// RxJS v6+
import { from } from 'rxjs';
//emit array as a sequence of values
const arraySource = from([1, 2, 3, 4, 5]);
//output: 1,2,3,4,5
const subscribe = arraySource.subscribe(val => console.log(val));Related Recipes
Additional Resources
Last updated