填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

MessageBusSink

已弃用: platform-webworker is deprecated in Angular and will be removed in a future version of Angular

      
      interface MessageBusSink {
  initChannel(channel: string, runInZone: boolean): void
  attachToZone(zone: NgZone): void
  to(channel: string): EventEmitter<any>
}
    

实现类

方法

Sets up a new channel on the MessageBusSink. MUST be called before calling to on the channel. If runInZone is true the sink will buffer messages and send only once the zone exits. if runInZone is false the sink will send messages immediately.

initChannel(channel: string, runInZone: boolean): void
      
      initChannel(channel: string, runInZone: boolean): void
    
参数
channel string
runInZone boolean
返回值

void

Assigns this sink to the given zone. Any channels which are initialized with runInZone set to true will wait for the given zone to exit before sending messages.

attachToZone(zone: NgZone): void
      
      attachToZone(zone: NgZone): void
    
参数
zone NgZone
返回值

void

Returns an EventEmitterfor the given channel To publish methods to that channel just call next on the returned emitter

to(channel: string): EventEmitter<any>
      
      to(channel: string): EventEmitter<any>
    
参数
channel string
返回值

EventEmitter<any>