workshops-de / angular.de

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

Update 2020-10-19-angular-tutorial-deutsch.md #96

Closed Gast114 closed 1 year ago

Gast114 commented 3 years ago

Ich habe 2 Stellen geändert, die nicht funktionierten.

books: { title: string; subtitle: string; }[]; statt books = []

books$: Observable; statt books$: Observable;

ger82 commented 2 years ago

Danke Gast114, das gleiche Problem hatte ich auch mit Angular 13 und einer out of the box installation.

Das ist übrigens die Fehlermeldung die ich original erhielt:

"Error: src/app/book-list/book-list.component.ts:31:5 - error TS2322: Type '{ title: string; subtitle: string; }[]' is not assignable to type 'never[]'. Type '{ title: string; subtitle: string; }' is not assignable to type 'never'.

31 this.books = this.bookData.getBooks();"

im Angular Tutorial "Tour of Heroes" wird ein Interface in einer separaten Datei genutzt.