mirror of https://github.com/ghostfolio/ghostfolio
3 changed files with 12 additions and 12 deletions
@ -1,19 +1,19 @@ |
|||
import { Injectable } from '@angular/core'; |
|||
import { Subject } from 'rxjs'; |
|||
import { Observable, Subject } from 'rxjs'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class LayoutService { |
|||
private shouldReloadSubject = new Subject<void>(); |
|||
public shouldReloadContent$: Observable<void>; |
|||
|
|||
// Observable stream
|
|||
public shouldReload$ = this.shouldReloadSubject.asObservable(); |
|||
private shouldReloadSubject = new Subject<void>(); |
|||
|
|||
public constructor() {} |
|||
public constructor() { |
|||
this.shouldReloadContent$ = this.shouldReloadSubject.asObservable(); |
|||
} |
|||
|
|||
// Method to trigger the reload
|
|||
public triggerReload() { |
|||
this.shouldReloadSubject.next(); |
|||
public getShouldReloadSubject() { |
|||
return this.shouldReloadSubject; |
|||
} |
|||
} |
|||
|
Loading…
Reference in new issue