What am I doing wrong?
import {bootstrap, Component} from \'angular2/angular2\'
@Component({
selector: \'conf-talks\',
template: `
I forgot to annotate my component with "@Input" (Doh!)
book-list.component.html (Offending code):
<-- Can't bind to 'book' since it isn't a known property of 'app-book-item'
Corrected version of book-item.component.ts:
import { Component, OnInit, Input } from '@angular/core';
import { Book } from '../model/book';
import { BookService } from '../services/book.service';
@Component({
selector: 'app-book-item',
templateUrl: './book-item.component.html',
styleUrls: ['./book-item.component.css']
})
export class BookItemComponent implements OnInit {
@Input()
public book: Book;
constructor(private bookService: BookService) { }
ngOnInit() {}
}