Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

FormControlOptions

Interface for options provided to a FormControl.

See more...

      
      interface FormControlOptions extends AbstractControlOptions {
  nonNullable?: boolean
  initialValueIsDefault?: boolean

  // inherited from forms/AbstractControlOptions
  validators?: ValidatorFn | ValidatorFn[] | null
  asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null
  updateOn?: 'change' | 'blur' | 'submit'
}
    

Description

This interface extends all options from AbstractControlOptions, plus some options unique to FormControl.

Properties

Property Description
nonNullable?: boolean

Whether to use the initial value used to construct the FormControl as its default value as well. If this option is false or not provided, the default value of a FormControl is null. When a FormControl is reset without an explicit value, its value reverts to its default value.

initialValueIsDefault?: boolean

Deprecated Use nonNullable instead.