ngx-admin/src/app/pages/dashboard/temperature/temperature.component.ts
2017-10-20 17:31:36 +03:00

31 lines
725 B
TypeScript

import { Component, OnDestroy } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
@Component({
selector: 'ngx-temperature',
styleUrls: ['./temperature.component.scss'],
templateUrl: './temperature.component.html',
})
export class TemperatureComponent implements OnDestroy {
temperature = 24;
temperatureOff = false;
temperatureMode = 'cool';
humidity = 87;
humidityOff = false;
humidityMode = 'heat';
colors: any;
themeSubscription: any;
constructor(private theme: NbThemeService) {
this.themeSubscription = this.theme.getJsTheme().subscribe(config => {
this.colors = config.variables;
});
}
ngOnDestroy() {
this.themeSubscription.unsubscribe();
}
}