title: Angular, to many API calls on input 'on-change'
body: <p>I am using angular 8.</p>
  
  <p>There is one auto-complete input and if it's value changes I have to make API call and load new suggestions for this input.</p>
  
  <pre><code>  //In Template
  
    &lt;autocomplate [suggestions]="suggestions" (filterChange)="filterChange($event)"&gt;&lt;/autocomplate&gt;
  
  
  
    //In Component
  
    filterChange(e) {
      console.log(e)
      this.loadSubscriptions(e ? { 'filterItem.name': e  } : {})
    }
  
    loadSubscriptions(params) {
       if (this.suggestionsSubscriber) this.suggestionsSubscriber.unsubscribe()
       this.suggestionsSubscriber = this.suggestionsService.loadData(params).subscribe(
          data =&gt; this.suggestions = data
       })
    }
  </code></pre>
  
  <p>Everything works fine, but the problem is when user types fast application makes to many requests. </p>
  
  <p>Can I somehow delay requests if user types fast? for example, while the user is typing don't make API calls on every change, and if the user stops typing then make API call.</p>
  
  <p>Or if you have a better way to solve this problem, please share.</p>