Input
1. Property Binding
<wt-book-preview [book]="bookList[0]"></wt-book-preview>bookPreviewComponent.book = this.bookList[0];2. Déclaration de la propriété
Template parse errors:
Can't bind to 'book' since it isn't a known property of 'wt-book-preview'.
1. If 'wt-book-preview' is an Angular component and it has 'book' input, then verify that it is part of this module.
2. If 'wt-book-preview' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component....
export class BookPreviewComponent {
book: Book;
}3. Décorateur @Input()
@Input()Résultat

Mis à jour