20
aio/content/examples/rx-library/src/naming-convention.ts
Normal file
20
aio/content/examples/rx-library/src/naming-convention.ts
Normal 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
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user