import { Component } from '@angular/core'; import { NbThemeService } from '@nebular/theme'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Component({ selector: 'ngx-form-inputs', 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'); })); } public readonly materialTheme$: Observable; public starRate: number = 2; public heartRate: number = 4; public radioGroupValue: string = 'This is value 2'; }