ngx-admin/src/app/pages/forms/form-inputs/form-inputs.component.ts

26 lines
792 B
TypeScript
Raw Normal View History

import { Component } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@Component({
selector: 'ngx-form-inputs',
2017-07-07 15:39:07 +03:00
styleUrls: ['./form-inputs.component.scss'],
templateUrl: './form-inputs.component.html',
})
export class FormInputsComponent {
public constructor(private readonly themeService: NbThemeService) {
this.materialTheme$ = this.themeService.onThemeChange()
.pipe(map(theme => {
const themeName: string = theme?.name || '';
return themeName.startsWith('material');
}));
}
2017-07-12 11:16:16 +03:00
public readonly materialTheme$: Observable<boolean>;
public starRate: number = 2;
public heartRate: number = 4;
public radioGroupValue: string = 'This is value 2';
}