Popular another array with the result of a search

Asked

Viewed 40 times

1

I need to get the object array after the search I do with ng2-search-filter.

Below where I have the input of my search already working, and I want to pass the result every time it is typed (keyup) some letter, in case, just need to pass the result, in case the "result", to be able to work with it in the file . ts

<div class="search-venda">
   <input class="form-control"  type="text"  [(ngModel)]="term" (keyup)="onKey($event, result)"  autocomplete="off" placeholder="Digite para pesquisar">
</div>

I print the data in a table with *ngFor

 <tr  *ngFor="let submission of vendas | filter:term; ">
              <td>{{submission.cnpj}}</td>
              <td>{{submission.razao_social}}</td>
              <td>{{submission.funcionario}}</td> </tr>

Everything working, I would just like the result of the search to be placed in a resulting array to be able to pass as parameter in (keyup) and work with these values in the file . ts, I need this because I need to calculate some values with the results obtained.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.