mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
23 lines
586 B
TypeScript
23 lines
586 B
TypeScript
import { Component, OnDestroy } from '@angular/core';
|
|
import { NbThemeService } from '@nebular/theme';
|
|
|
|
@Component({
|
|
selector: 'ngx-kitten',
|
|
styleUrls: ['./kitten.component.scss'],
|
|
templateUrl: './kitten.component.html',
|
|
})
|
|
export class KittenComponent implements OnDestroy {
|
|
|
|
currentTheme: string;
|
|
themeSubscription: any;
|
|
|
|
constructor(private themeService: NbThemeService) {
|
|
this.themeSubscription = this.themeService.getJsTheme().subscribe(theme => {
|
|
this.currentTheme = theme.name;
|
|
});
|
|
}
|
|
|
|
ngOnDestroy() {
|
|
this.themeSubscription.unsubscribe();
|
|
}
|
|
}
|