title: How to limit the search results in Angular12
body: <p>I'm trying to limit the results that shows in the table. I've tried to put ngrepeat with limitTo, but it didn't work.</p>
  <p>Here's my code:</p>
  <p><code>busqueda.component.ts</code></p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: 'app-busqueda',
    templateUrl: './busqueda.component.html',
    styleUrls: ['./busqueda.component.css'],
  })
  
  
  export class BusquedaComponent implements OnInit {
  
  
    filterTerm: string;
  
    items = [];
  
    actas = [{
        &quot;nombre&quot;: &quot;Lede, Lourdes del Mar&quot;,
        &quot;DNI&quot;: &quot;40.775.265&quot;,
        &quot;FechaNacimiento&quot;: &quot;17/02/1998&quot;,
        &quot;LugarNacimiento&quot;: &quot;La Rioja, Capital&quot;,
        &quot;ActaNacimiento&quot;: &quot;VER&quot;
      }
      
    ];
  
    //paginación
    pageOfItems: Array&lt;any&gt;;
  
  
    constructor() { }
  
    ngOnInit(): void {
      console.log(123);
  
      this.items = Array(150).fill(0).map((x, i) =&gt; ({ id: (i + 1)}));
    }
  
    onChangePage(pageOfItems: Array&lt;any&gt;) {
      // update current page of items
      this.pageOfItems = pageOfItems;
  }
  
  }
  </code></pre>
  <p><code>busqueda.component.html</code></p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
  &lt;h1 class=&quot;titulo text-center&quot;&gt;Buscar un acta&lt;/h1&gt;
  &lt;div class=&quot;busqueda&quot;&gt;
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;Buscar...&quot; [(ngModel)]=&quot;filterTerm&quot;&gt;
          &lt;i class=&quot;fas fa-search&quot;&gt;&lt;/i&gt;
      &lt;/div&gt;
      &lt;p class=&quot;txt text-center&quot;&gt;La búsqueda se puede realizar por nombre, apellido, DNI, fecha de nacimiento o lugar de nacimiento.&lt;/p&gt;
      &lt;table class=&quot;table table-hover&quot;&gt;
          &lt;thead&gt;
              &lt;tr class=&quot;tabla&quot;&gt;
                  &lt;th&gt;Apellido y Nombre&lt;/th&gt;
                  &lt;th&gt;DNI&lt;/th&gt;
                  &lt;th&gt;Fecha de Nacimiento&lt;/th&gt;
                  &lt;th&gt;Lugar de Nacimiento&lt;/th&gt;
                  &lt;th&gt;Acta de Nacimiento&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody *ngFor=&quot;let acta of actas | filter:filterTerm&quot;&gt;
              &lt;tr class=&quot;tabla&quot;&gt;
                  &lt;td class=&quot;txt-left&quot;&gt;{{acta.nombre}}&lt;/td&gt;
                  &lt;td&gt;{{acta.DNI}}&lt;/td&gt;
                  &lt;td&gt;{{acta.FechaNacimiento}}&lt;/td&gt;
                  &lt;td&gt;{{acta.LugarNacimiento}}&lt;/td&gt;
                  &lt;td&gt;{{acta.ActaNacimiento}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I don't know how to continue, any help it will help me a lot.
  The searchbox it's working OK, it show the list, maybe I can limit to 10 or 5 results, because it will be a lot to search in database when the program are running, this is why I'm here.</p>