Ward Bell 07cfce795f docs(testing): testing chapter and samples for RC6 (#2198)
[WIP] docs(testing): new chapter, new samples
2016-09-13 14:39:39 -07:00

21 lines
499 B
TypeScript

// #docregion
import { Component, OnInit } from '@angular/core';
import { TwainService } from './twain.service';
// #docregion component
@Component({
selector: 'twain-quote',
template: '<p class="twain"><i>{{quote}}</i></p>'
})
export class TwainComponent implements OnInit {
intervalId: number;
quote = '...';
constructor(private twainService: TwainService) { }
ngOnInit(): void {
this.twainService.getQuote().then(quote => this.quote = quote);
}
}
// #enddocregion component