<p>writers works!</p>
<button (click)="sortByAwards()">Sort awards</button>
<button (click)="sortByBirth()">Sort birth</button>

<div *ngIf="allWriters.length>0; else noWriters">
  <table>
    <tr>
      <th>Firstname</th>
      <th>Lastname</th>
      <th>Awards</th>
      <th>Birthday</th>
    </tr>
    <tr *ngFor="let writer of allWriters"
    [class.red]="writer.awards>3">
      <td>{{writer.firstname}}</td>
      <td>{{writer.lastname}}</td>
      <td>{{writer.awards}}</td>
      <td>{{writer.birthday|date: 'short'}}</td>
    </tr>
  </table>

</div>
<ng-template #noWriters>
  No writers for you
</ng-template>
