MessageBusSource

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

实现类

方法

Sets up a new channel on the MessageBusSource. MUST be called before calling from on the channel. If runInZone is true then the source will emit events inside the angular zone. if runInZone is false then the source will emit events inside the global zone.

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

void

Assigns this source to the given zone. Any channels which are initialized with runInZone set to true will emit events that will be executed within the given zone.

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

void

Returns an EventEmitterthat emits every time a message is received on the given channel.

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

EventEmitter<any>