Angular · Middle · Question 13 of 75

Which operator suits a search-as-you-type request so that only the latest query result is shown?

Explanation

switchMap unsubscribes from the previous inner Observable (cancelling the HTTP request) when a new value arrives, so slow old responses can't overwrite newer results.

Further reading

Problem with a question

Angular · Middle · question 13

Test yourself

Take the Angular · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz