@ -8,7 +8,7 @@
|
||||
|
||||
import {Component, NgModule, OnInit, TemplateRef, ViewChild} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
import {Subject} from 'rxjs';
|
||||
|
||||
|
||||
// #docregion NgIfSimple
|
||||
|
@ -6,9 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, NgModule, OnInit, TemplateRef, ViewChild} from '@angular/core';
|
||||
import {Component, NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
|
||||
|
||||
// #docregion NgTemplateOutlet
|
||||
|
@ -7,8 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Subscriber} from 'rxjs/Subscriber';
|
||||
import {Observable, Observer} from 'rxjs';
|
||||
|
||||
// #docregion AsyncPipePromise
|
||||
@Component({
|
||||
@ -49,7 +48,7 @@ export class AsyncPromisePipeComponent {
|
||||
template: '<div><code>observable|async</code>: Time: {{ time | async }}</div>'
|
||||
})
|
||||
export class AsyncObservablePipeComponent {
|
||||
time = new Observable<string>((observer: Subscriber<string>) => {
|
||||
time = new Observable<string>((observer: Observer<string>) => {
|
||||
setInterval(() => observer.next(new Date().toString()), 1000);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user