Observable

noun

say it: “ub-ZER-vuh-bul” /əbˈzɜːrvəbəl/

A stream of values arriving over time, such as an HTTP response, that does nothing until something subscribes.

What is Observable?

An Observable is a stream that can deliver values over time, like a news feed. Nothing happens until someone subscribes. HttpClient returns one for each request.

this.http.get<Movie[]>('/api/movies')  // an Observable
  .subscribe(movies => this.movies = movies);

In a sentence

  • “http.get returns an Observable, so nothing is sent until someone subscribes.”

Level: Journeyman · More Angular terms at this level

Updated