mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
fix(docs): guard before redirecting
This commit is contained in:
parent
413cbdbd01
commit
ec3ef4e879
5 changed files with 21 additions and 10 deletions
|
|
@ -62,15 +62,14 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
private analytics: AnalyticsService,
|
||||
private currentThemeService: CurrentThemeService,
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.materialTheme$ = new Observable(subscriber => {
|
||||
const themeName: string = this.currentThemeService.getCurrentTheme();
|
||||
|
||||
subscriber.next(themeName.startsWith('material'));
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.currentTheme = this.themeService.currentTheme;
|
||||
|
||||
this.userService.getUsers()
|
||||
|
|
@ -104,6 +103,10 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
changeTheme(themeName: string) {
|
||||
this.currentThemeService.setCurrentTheme(themeName);
|
||||
this.themeService.changeTheme(themeName);
|
||||
|
||||
this.materialTheme$ = new Observable(subscriber => {
|
||||
subscriber.next(this.currentThemeService.getCurrentTheme().startsWith('material'));
|
||||
});
|
||||
}
|
||||
|
||||
toggleSidebar(): boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue