You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aConnect-UX/src/app/services/sidebar.service.ts

19 lines
447 B
TypeScript

import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class SidebarService {
private isSidebarOpen = new BehaviorSubject<boolean>(false);
public sidebarState$ = this.isSidebarOpen.asObservable();
currentSubModule:string;
constructor() {
this.currentSubModule = '';
}
toggleSidebar(): void {
this.isSidebarOpen.next(!this.isSidebarOpen.value);
}
}