docs(aio): add Observable and Rx docs (#21423)

PR Close #21423
This commit is contained in:
Jason Aden
2018-01-09 11:31:41 -08:00
committed by Alex Eagle
parent d100f1b187
commit 79656e7f96
28 changed files with 1301 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';
@Component({
selector: 'app-stopwatch',
templateUrl: './stopwatch.component.html'
})
export class StopwatchComponent {
stopwatchValue: number;
stopwatchValue$: Observable<number>;
start() {
this.stopwatchValue$.subscribe(num =>
this.stopwatchValue = num
);
}
}