本文整理汇总了TypeScript中rxjs/Subject.Subject类的典型用法代码示例。如果您正苦于以下问题:TypeScript Subject类的具体用法?TypeScript Subject怎么用?TypeScript Subject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Subject类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.image.onerror = (err) => {
this.imageLoadSubject.complete();
};
示例2: constructor
constructor(event: esriMouseEvent) {
super(event);
this._featureSubject = new Subject();
this.features = this._featureSubject.asObservable();
}
示例3:
.then((directoryUser:DirectoryUser) => {
this._sessionUser.isAdmin = directoryUser.isAdmin;
this.isSignedInSubject.next(true);
return this._sessionUser.hostedDomain === GoogleApplicationAccount.domain;
})
示例4:
this.get('assets/talks.json').subscribe((talks: Array<TalkModel>) => {
this.talks = talks;
talks.forEach((talk: TalkModel) => subject.next(talk));
subject.complete();
});
示例5:
.then(user => {
logger.debug('has authenticated user', user);
authState.next({ state: 'signedIn', user: user });
})
示例6: observe
observe(): Observable<any> {
return this._subject.asObservable();
}
示例7: onEnd
private onEnd(event: TransitionEvent | AnimationEvent): void {
if (!this.animationEnd.closed) {
this.animationEnd.next(event);
}
}
示例8: ngOnDestroy
ngOnDestroy(): void {
if (this.animationEnd && !this.animationEnd.closed) {
this.animationEnd.complete();
}
}