<div>
    Name: <input type="text" name="name" [(ngModel)]="book.name"><br/>
    Author: <input type="text" name="author" [(ngModel)]="book.author"><br/>
    Pages: <input type="number" name="pages" [(ngModel)]="book.pages"><br/>
    <button (click)="addBook()">Add book</button>
    {{message}}
    <hr/>
    <div>
        <table>
            @for(book of allBooks; track book.name){
                <tr>
                    <td>{{book.name}}</td>
                    <td>{{book.author}}</td>
                    <td>{{book.pages}}</td>
                    <td>{{book.likes}}</td>
                    <td><button (click)="deleteBook(book)">Delete book</button></td>
                </tr>
            }
        </table>
    </div>
</div>
