Skip to content

Commit

Permalink
fix: using rating() everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesHoppe committed Nov 3, 2024
1 parent 59ffdb2 commit ef9f87d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/books/book/book.component.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@let b = book();

<div class="card mb-4">
<div class="card-body bg-light">
<img class="img-thumbnail float-end"
src="//api.angular.schule/avatar/{{ b.rating }}">
src="//api.angular.schule/avatar/{{ rating() }}">
<div class="card-title">
<h2>
{{ title() }}
<span class="badge bg-secondary me-2">{{ rating() }}</span>
</h2>
</div>
<p>{{ b.description }}</p>
<p>{{ book().description }}</p>

<button [disabled]="rating() <= 1" class="btn btn-primary me-2" (click)="doRateDown()">-1</button>
<button [disabled]="rating() >= 5" class="btn btn-primary" (click)="doRateUp()">+1</button>
Expand Down

0 comments on commit ef9f87d

Please sign in to comment.