Save page on name change & refresh sidebar (#20)
parent
292bf6c729
commit
07664e29cd
@ -0,0 +1,15 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {BehaviorSubject} from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NavigationService {
|
||||
protected refreshCount = 0;
|
||||
public readonly sidebarRefresh$: BehaviorSubject<[number, boolean]> = new BehaviorSubject<[number, boolean]>([this.refreshCount, true]);
|
||||
|
||||
requestSidebarRefresh({ quiet = false }) {
|
||||
this.refreshCount += 1;
|
||||
this.sidebarRefresh$.next([this.refreshCount, quiet]);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue