// #docregion import { Component, OnInit } from '@angular/core'; import { Observable, of } from 'rxjs'; import { catchError, startWith } from 'rxjs/operators'; import { TwainService } from './twain.service'; // #docregion component @Component({ selector: 'twain-quote', // #docregion template template: `
{{quote | async}}
{{ errorMessage }}
`, // #enddocregion template styles: [ `.twain { font-style: italic; } .error { color: red; }` ] }) export class TwainComponent implements OnInit { errorMessage: string; quote: Observable