import { Component } from '@angular/core';
                             
@Component({
  selector: 'contents',
  templateUrl: './books.component.html'
})
export class BooksComponent {
  constructor() {
    this.message = '';
    this.getBooks(); //don't do this... we will see later why
  }
  getBooks() {
    this.books = [
      { title: 'book2', author: 'author2', price: 12.03, date: new Date('09/08/1998'), link: 'https://www.amazon.com/Who-Moved-My-Cheese-Amazing/dp/0399144463'},
      { title: 'book1', author: 'author1', price: 12.03, date: new Date('09/08/1998'), link: 'https://www.amazon.com/Who-Moved-My-Cheese-Amazing/dp/0399144463'},
    ];
  }
}