Removed themeService from templates #70

This commit is contained in:
2022-10-16 12:57:27 +02:00
parent ba881aefa8
commit 1a3126dfc5
7 changed files with 91 additions and 56 deletions

View File

@@ -10,15 +10,32 @@ import { ThemeService } from './services/theme/theme.service';
})
export class AppComponent implements OnInit {
themeName!: string;
sidebarWidth!: string;
isLoggedIn: boolean = false;
constructor(
public authService: AuthService,
public themeService: ThemeService,
private themeService: ThemeService,
private socket: SocketService
) { }
ngOnInit(): void {
this.themeService.sidebarWidth$.subscribe(value => {
this.sidebarWidth = value;
});
this.themeService.themeName$.subscribe(value => {
this.themeName = value;
});
this.socket.startSocket();
this.themeService.loadTheme();
this.themeService.loadMenu();
}
setSideWidth($event: any): void {
this.themeService.setSideWidth($event);
}
}