import { Component } from '@angular/core' ; import { FormBuilder , FormGroup , Validators } from '@angular/forms' ; title @ Component ( { selector : 'form-field-theming-example' , templateUrl : 'form-field-theming-example.html' , styleUrls : [ 'form-field-theming-example.css' ] , } ) export class FormFieldThemingExample { options : FormGroup ; constructor ( fb ) { this . options = fb . group ( { color : 'primary' , fontSize : [ 16 , Validators . min ( 10 ) ] , } ) ; } getFontSize ( ) { return Math . max ( 10 , this . options . value . fontSize ) ; } }