中化加油站项目
 
 
 
 
 
 

22 lines
577 B

import { Injectable } from '@angular/core';
import { Observable, ReplaySubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class IsShowEchartsService {
constructor() { }
private _sendMessage: ReplaySubject<any> = new ReplaySubject<any>(1);
/** * 向其他组件发送信息 **
* @param message 需要发送的信息 *
* @returns {Observavle<any>} */
public sendMessage(message: any) {
this._sendMessage.next(message);
}
public getMessage(): Observable<any> {
return this._sendMessage.asObservable();
}
}