<table mat-table [dataSource]="products" matSort matSortDisableClear>
  <ng-container matColumnDef="name">
    <th mat-header-cell *matHeaderCellDef mat-sort-header>Nazwa</th>
    <td mat-cell *matCellDef="let product">
      <a [routerLink]="['/products', product.id]">{{product.name}}</a>
    </td>
  </ng-container>
  <ng-container matColumnDef="price">
    <th mat-header-cell *matHeaderCellDef mat-sort-header>Cena</th>
    <td mat-cell *matCellDef="let product">{{product.price | currency}}</td>
  </ng-container>
  <tr mat-header-row *matHeaderRowDef="columnNames"></tr>
  <tr mat-row *matRowDef="let row; columns: columnNames;"></tr>
</table>
<mat-paginator [pageSize]="5" [pageSizeOptions]="[5,10,15]"></mat-paginator>
<app-product-create (added)="onAdd($event)"></app-product-create>
