【发布时间】:2016-07-29 10:00:04
【问题描述】:
export declare class EventEmitter<T> extends Subject<T> {
/**
* Creates an instance of [EventEmitter], which depending on [isAsync],
* delivers events synchronously or asynchronously.
*/
constructor(isAsync?: boolean);
emit(value: T): void;
/**
* @deprecated - use .emit(value) instead
*/
next(value: any): void;
subscribe(generatorOrNext?: any, error?: any, complete?: any): any;
}
在官方 Angular 2 Typescript 定义中,似乎无法静音或取消订阅 EventEmitter。
随着页面使用相同的 EventEmitter,我得到了回调
【问题讨论】:
-
展示你是如何使用事件发射器的
标签: angular rxjs eventemitter