Open web-dave opened 4 months ago
BookList
service = inject(BookService);
... books: any[] = []; getAllBooks() { this.service.getAll().subscribe((data) => (this.books = data)); }
... @for (book of books; track $index) { <div class="book"> <strong>{{ book.title }}</strong> <br /> <small>{{ book.subtitle }}</small> </div> }
@import "../../../utils"; .book { @include object(100%, 60px, $aqua); border-radius: 90px; margin-top: 10px; padding-left: 45px; padding-top: 10px; }
NEXT
BookList
via DIbook-list.component.ts
book-list.component.ts
book-list.component.html
book-list.component.scss