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]); } }