We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f32ff43 commit 83a64e9Copy full SHA for 83a64e9
README.md
@@ -735,9 +735,14 @@ You can download the PDF and Epub version of this repository from the latest run
735
Time: {{ time | async }}</div>`
736
})
737
export class AsyncObservablePipeComponent {
738
- time = new Observable(observer =>
739
- setInterval(() => observer.next(new Date().toString()), 2000)
740
- );
+ time: Observable<string>;
+ constructor() {
+ this.time = new Observable((observer) => {
741
+ setInterval(() => {
742
+ observer.next(new Date().toString());
743
+ }, 2000);
744
+ });
745
+ }
746
}
747
```
748
0 commit comments