2018-01-09 11:31:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
import { Component } from '@angular/core';
|
2018-02-27 17:06:06 -05:00
|
|
|
import { Observable } from 'rxjs';
|
2018-01-09 11:31:41 -08:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-stopwatch',
|
|
|
|
templateUrl: './stopwatch.component.html'
|
|
|
|
})
|
|
|
|
export class StopwatchComponent {
|
|
|
|
|
|
|
|
stopwatchValue: number;
|
|
|
|
stopwatchValue$: Observable<number>;
|
|
|
|
|
|
|
|
start() {
|
|
|
|
this.stopwatchValue$.subscribe(num =>
|
|
|
|
this.stopwatchValue = num
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|