class
NonNullableFormBuilder
is similar to FormBuilder
, but automatically constructed FormControl
elements have {nonNullable: true}
and are non-nullable.
abstract class NonNullableFormBuilder { abstract group<T extends {}>(controls: T, options?: AbstractControlOptions): FormGroup<{...} abstract record<T>(controls: { [key: string]: T; }, options?: AbstractControlOptions): FormRecord<ɵElement<T, never>> abstract array<T>(controls: T[], validatorOrOpts?: ValidatorFn | AbstractControlOptions | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormArray<ɵElement<T, never>> abstract control<T>(formState: T | FormControlState<T>, validatorOrOpts?: ValidatorFn | AbstractControlOptions | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl<T> }
'root'
group() | ||||||
---|---|---|---|---|---|---|
Similar to | ||||||
|
controls | T | |
options | AbstractControlOptions | Optional. Default is |
FormGroup<{ [K in keyof T]: ɵElement<T[K], never>; }>
record() | ||||||
---|---|---|---|---|---|---|
Similar to | ||||||
|
controls | object | |
options | AbstractControlOptions | Optional. Default is |
FormRecord<ɵElement<T, never>>
array() | |||||||||
---|---|---|---|---|---|---|---|---|---|
Similar to | |||||||||
|
controls | T[] | |
validatorOrOpts | ValidatorFn | AbstractControlOptions | ValidatorFn[] | Optional. Default is |
asyncValidator | AsyncValidatorFn | AsyncValidatorFn[] | Optional. Default is |
FormArray<ɵElement<T, never>>
control() | |||||||||
---|---|---|---|---|---|---|---|---|---|
Similar to | |||||||||
|
formState | T | FormControlState<T> | |
validatorOrOpts | ValidatorFn | AbstractControlOptions | ValidatorFn[] | Optional. Default is |
asyncValidator | AsyncValidatorFn | AsyncValidatorFn[] | Optional. Default is |
FormControl<T>
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/forms/NonNullableFormBuilder