Skip to content

Commit 6630d9c

Browse files
BaggersIOrobinboehm
authored andcommitted
Component LifeCycle Basic
1 parent 1dca3ab commit 6630d9c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/book-list/book-list.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ export class BookListComponent implements OnInit {
1212
books: Book[] = [];
1313

1414
constructor(private bookService: BookDataService) {
15-
16-
this.bookService.getBooks().subscribe(books => this.books = books);
15+
1716
}
1817

1918
ngOnInit() {
19+
20+
this.bookService.getBooks().subscribe(books => this.books = books);
2021
}
2122

2223
}

0 commit comments

Comments
 (0)