Observables represent asynchronous streams of data. Angular uses RxJS for handling such streams.
import { Observable } from 'rxjs';
const obs = new Observable(sub => {
sub.next('Hello');
sub.complete();
});
map()filter()switchMap()mergeMap()debounceTime()
this.http.get('/users')
.pipe(
map(data => data),
filter(user => user.active)
)
.subscribe();
Take quizzes related to this topic and see where you stand!
Start Quiz Now