We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13fd98a commit 704ba0eCopy full SHA for 704ba0e
src/app/modules/shared/components/sidebar/sidebar.component.ts
@@ -26,12 +26,13 @@ export class SidebarComponent implements OnInit, OnDestroy {
26
27
ngOnInit(): void {
28
this.toggleSideBar();
29
- this.sidebarItems$ = this.getSidebarItems().subscribe();
30
- this.highlightMenuOption(this.router.routerState.snapshot.url);
+ const currentRouting = this.router.routerState.snapshot.url;
+ this.sidebarItems$ = this.getSidebarItems().subscribe(() => this.highlightMenuOption(currentRouting));
31
this.navStart.subscribe((evt) => {
32
this.highlightMenuOption(evt.url);
33
});
34
}
35
+
36
ngOnDestroy(): void {
37
this.sidebarItems$.unsubscribe();
38
0 commit comments