title: call keyup event with delay in angular
body: <p>I have text box and assigned to it <code>keyup</code> event a search function but I want it to happen with delay, not on every keypress</p>
  
  <p>here is the html code :</p>
  
  <pre><code>&lt;input type="text" [(ngModel)]="searchedKPI" (keyup)="searchConfigTree()"&gt;
  </code></pre>
  
  <p>and here is ts code :</p>
  
  <pre><code>list = list.filter(item =&gt; item.label.toLocaleLowerCase().includes(this.searchedKPI.toLocaleLowerCase())).slice();
  </code></pre>
  
  <p>and here is the example I wanted to search "text" string but the event happens 4 times, I want to this happens once only for "text" string :</p>
  
  <p><a href="https://i.stack.imgur.com/lRflt.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/lRflt.jpg" alt="enter image description here"></a></p>
  
  <p>what the solution?</p>