<table class="table">
  <thead>
    <tr>
      <th>Spółka</th>
      <th>Koszt</th>
      <th>Wartość</th>
      <th>Zmiana</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let stock of stocks; let i = index">
      <td>{{stock.symbol}}</td>
      <td>{{stock.cost | currency:'USD':'symbol':'.2'}}</td>
      <td>{{stock.price | currency:'USD':'symbol':'.2'}}</td>
      <td>{{stock.change | currency:'USD':'symbol':'.2'}}</td>
      <td class="btn-cell"><button class="btn btn-sm" (click)="sell(i)">Sprzedaj</button></td>
    </tr>
    <tr *ngIf="!stocks.length">
      <td colspan="5">Nie masz żadnych akcji, Kup jakieś!</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th>Totals</th>
      <th>{{accountService.cost | currency:'USD':'symbol':'.2'}}</th>
      <th>{{accountService.value | currency:'USD':'symbol':'.2'}}</th>
      <th>{{accountService.value - accountService.cost | currency:'USD':'symbol':'.2'}}</th>
      <th></th>
    </tr>
  </tfoot>
</table>