(function(app) {
  app.BooksComponent = ng.core
    .Component({
      selector: 'books',
      templateUrl: 'app/books.component.html'
    })                    
    .Class({
      constructor: function() {
        this.books = [];
      },
     getBooks: function() { 
       //Later we will get this data from the server.
       this.books = [
       {id: 1, name: 'Test Driven Development: By Example', author: 'Kent Beck', publisher: 'Addison-Wesley', link: 'http://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/0321146530'},
       {id: 2, name: 'JavaScript: The Good Parts', author: 'Douglas Crockford', publisher: "O'Reilly", link: 'http://shop.oreilly.com/product/9780596517748.do'},
       ];
     },
     ngOnInit: function() {
       this.getBooks();
     }
   });
})(window.app || (window.app = {}));