web-dave / angular-essentials-workshop

2 stars 0 forks source link

use BookService #10

Open web-dave opened 2 years ago

web-dave commented 2 years ago
web-dave commented 2 years ago
generate (if not exists!!) ```bash ng g c books/book-list ```
book-list.component.ts ```typescript private bookService = inject(BookService) ngOnInit() { this.bookService.getBooks().subscribe(books => this.books = books); } ```
book-list.component.html ```html
  • {{book.title}}
```
web-dave commented 2 years ago

Next