workshops-de / angular.de

Website of angular.de 🅰️
https://angular.de
13 stars 65 forks source link

bookService should be replaced by bookData or vice versa #83

Closed zBugi closed 4 years ago

zBugi commented 4 years ago

In this article this doesnt work cause of bookService should be bookData or vice versa

export class BookListComponent {

 books = [];

 constructor(private bookData: BookDataService) {
   this.books = this.bookService.getBooks();
  }

}

correct would be

export class BookListComponent {

 books = [];

 constructor(private bookData: BookDataService) {
   this.books = this.bookData.getBooks();
  }

}

or


export class BookListComponent {

 books = [];

 constructor(private bookService: BookDataService) {
   this.books = this.bookService.getBooks();
  }

}
robinboehm commented 4 years ago

Awesome! Thanks @zBugi! <3