The file brief-component.ts contains the following code where the drawer service is being called:
this.assignDrawerService.showDrawer(parameter);
In the file drawer-service.ts:
private drawerSubject = new BehaviorSubject<boolean>(false);
public drawer$: Observable<boolean> = this.drawerSubject.asObservable();
public showDrawer(viewType:any) {
this.drawerSubject.next(viewType);
}
Within the file drawer-component.ts, it seems that the debugger is hitting multiple times:
this.assignDrawerService.drawer$.subscribe(viewType => {
debugger
});
The user mentions having tried methods such as takeUntil, unsubscribe, and first to only run the subscriber once.