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 { Injectable } from '@angular/core'; |
||||
import { Subject } from 'rxjs'; |
import { Observable, Subject } from 'rxjs'; |
||||
|
|
||||
@Injectable({ |
@Injectable({ |
||||
providedIn: 'root' |
providedIn: 'root' |
||||
}) |
}) |
||||
export class LayoutService { |
export class LayoutService { |
||||
private shouldReloadSubject = new Subject<void>(); |
public shouldReloadContent$: Observable<void>; |
||||
|
|
||||
// Observable stream
|
private shouldReloadSubject = new Subject<void>(); |
||||
public shouldReload$ = this.shouldReloadSubject.asObservable(); |
|
||||
|
|
||||
public constructor() {} |
public constructor() { |
||||
|
this.shouldReloadContent$ = this.shouldReloadSubject.asObservable(); |
||||
|
} |
||||
|
|
||||
// Method to trigger the reload
|
public getShouldReloadSubject() { |
||||
public triggerReload() { |
return this.shouldReloadSubject; |
||||
this.shouldReloadSubject.next(); |
|
||||
} |
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue