You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
559 B
19 lines
559 B
4 years ago
|
import { Injectable } from '@angular/core';
|
||
|
import {ReplaySubject} from "rxjs";
|
||
|
import { Observable } from "rxjs";
|
||
|
@Injectable({
|
||
|
providedIn: 'root'
|
||
|
})
|
||
|
export class MaskLayerService {
|
||
|
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();
|
||
|
}
|
||
|
constructor() { }
|
||
|
}
|