Angular · Middle · Question 13 of 75
Which operator suits a search-as-you-type request so that only the latest query result is shown?
- ✓Correct answer:
switchMap - 2
mergeMap - 3
concatMap
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.