Skip to content

Instantly share code, notes, and snippets.

@oleersoy
Last active November 12, 2019 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleersoy/43f96d26a50a72316391b9ef35f0fcf5 to your computer and use it in GitHub Desktop.
Save oleersoy/43f96d26a50a72316391b9ef35f0fcf5 to your computer and use it in GitHub Desktop.
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