title: Cancel pending $http request
body: <p>I started working on a single page application with angular 6 and web API. I have a search box in it which searches data on key up event. I see the behavior that old response is loaded first and then the next responses which don’t look good on the slow connection. How can I cancel the pending search request every time key up is fired with new or less character.</p>