@if(allWriters.length>0){
<br>
<div>
    <img [src]="writerImage" width="30px">
</div>
<button (click)="sortByAwards()">Sort awards</button>
<button (click)="sortByBirthday()">Sort birthday</button>
<table border="1">
    <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Awards</th>
        <th>Birthday</th>
    </tr>
    
        @for(writer of allWriters; track writer.lastname){
            <tr [class.color]="writer.awards>3">
                <td>{{writer.firstname}}</td>
                <td>{{writer.lastname}}</td>
                <td>{{writer.awards}}</td>
                <td>{{writer.birthday | date: "shortDate"}}</td>
                <!--<td>{{writer.birthday | date: "yyyy-M-d"}}</td>-->
            </tr>
        }
</table>
}
@else {
     <p>Nema pisaca</p>
}
    

