mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-09-22 05:50:48 +02:00
24 lines
563 B
TypeScript
24 lines
563 B
TypeScript
![]() |
/**
|
||
|
* @license
|
||
|
* Copyright Akveo. All Rights Reserved.
|
||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||
|
*/
|
||
|
|
||
|
import { Injectable } from '@angular/core';
|
||
|
import { Observable, ReplaySubject } from 'rxjs';
|
||
|
import { share } from 'rxjs/operators';
|
||
|
|
||
|
@Injectable()
|
||
|
export class DialogStateService {
|
||
|
|
||
|
protected dialogState$ = new ReplaySubject();
|
||
|
|
||
|
changeDialogState(state: string) {
|
||
|
this.dialogState$.next({state});
|
||
|
}
|
||
|
|
||
|
onChangeDialogState(): Observable<any> {
|
||
|
return this.dialogState$.pipe(share());
|
||
|
}
|
||
|
}
|