Last active
November 12, 2019 19:29
-
-
Save oleersoy/43f96d26a50a72316391b9ef35f0fcf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Input } from '@angular/core'; | |
import { Book } from '../model/'; | |
@Component({ | |
selector: 'bc-book-authors', | |
template: ` | |
<h5 mat-subheader>Written By:</h5> | |
<span> | |
{{ authors | bcAddCommas }} | |
</span> | |
`, | |
styles: [ | |
` | |
h5 { | |
margin-bottom: 5px; | |
} | |
`, | |
], | |
}) | |
export class BookAuthorsComponent { | |
@Input() book: Book; | |
get authors() { | |
return this.book.volumeInfo.authors; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment