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.
19 lines
447 B
TypeScript
19 lines
447 B
TypeScript
|
2 weeks ago
|
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);
|
||
|
|
}
|
||
|
|
}
|