scrimba
Build Your First Angular app
Working with Pipes - Data Binding in Angular
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Working with Pipes - Data Binding in Angular
AboutCommentsNotes
Working with Pipes - Data Binding in Angular
Expand for more info
src
app
customers
customers-list
customers-list.component.html
run
preview
console
<filter-textbox></filter-textbox>
<br />
<br />
<table class="table table-hover">
<thead>
<tr>
<th (click)="sort('name')">Name</th>
<th (click)="sort('city')">City</th>
<th (click)="sort('orderTotal')">Order Total</th>
</tr>
</thead>
<tr *ngFor="let cust of filteredCustomers">
<td>
<a>
{{ cust.name }}
</a>
</td>
<td>{{ cust.city }}</td>
<td>{{ cust.orderTotal }}</td>
</tr>
<tr *ngIf="filteredCustomers && filteredCustomers.length">
<td colspan="2">&nbsp;</td>
<td>
{{ customersOrderTotal }}
</td>
</tr>
<tr *ngIf="!filteredCustomers || !filteredCustomers.length">
<td colspan="4">No customers found</td>
</tr>
</table>
Number of Customers: {{ filteredCustomers.length }}
<br />
Console
"Angular is running in the development mode. Call enableProdMode() to enable the production mode."
,
customers
-9:32