Skip to content

Instantly share code, notes, and snippets.

@subratastack
Created March 21, 2019 23:09
Show Gist options
  • Save subratastack/f162cdb9c1c69ade47b87282b1718a55 to your computer and use it in GitHub Desktop.
Save subratastack/f162cdb9c1c69ade47b87282b1718a55 to your computer and use it in GitHub Desktop.
Angular 7 Pipes
<h1>
Angular 7 Pipes
</h1>
<div>
<div>
<input type="search" placeholder="Search" [(ngModel)]="searchTerm">
</div>
<div>
<table class="user-table">
<thead class="user-table-header">
<tr>
<td>ID</td>
<td>First Name</td>
<td>Last Name</td>
<td>Country</td>
<td>Gender</td>
<td>Age</td>
</tr>
</thead>
<tbody class="user-table-body">
<tr *ngFor="let user of userData | userSearch:searchTerm">
<td>{{user.id}}</td>
<td>{{user.first_name}}</td>
<td>{{user.last_name}}</td>
<td>{{user.country}}</td>
<td>{{user.gender}}</td>
<td>{{user.age}}</td>
</tr>
</tbody>
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment