NonNullableFormBuilder
NonNullableFormBuilder is similar to FormBuilder, but automatically constructed
FormControl elements have {nonNullable: true} and are non-nullable.
API
abstract class NonNullableFormBuilder { abstract group<T extends {}>(controls: T, options?: AbstractControlOptions | null | undefined): FormGroup<ɵNonNullableFormControls<T>>; abstract record<T>(controls: { [key: string]: T; }, options?: AbstractControlOptions | null | undefined): FormRecord<ɵElement<T, never>>; abstract array<T>(controls: T[], validatorOrOpts?: ValidatorFn | AbstractControlOptions | ValidatorFn[] | null | undefined, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null | undefined): FormArray<ɵElement<T, never>>; abstract control<T>(formState: T | FormControlState<T>, validatorOrOpts?: ValidatorFn | AbstractControlOptions | ValidatorFn[] | null | undefined, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null | undefined): FormControl<T>;}
group
FormGroup<ɵNonNullableFormControls<T>>Similar to FormBuilder#group, except any implicitly constructed FormControl
will be non-nullable (i.e. it will have nonNullable set to true). Note
that already-constructed controls will not be altered.
TFormGroup<ɵNonNullableFormControls<T>>record
FormRecord<ɵElement<T, never>>Similar to FormBuilder#record, except any implicitly constructed FormControl
will be non-nullable (i.e. it will have nonNullable set to true). Note
that already-constructed controls will not be altered.
{ [key: string]: T; }FormRecord<ɵElement<T, never>>array
FormArray<ɵElement<T, never>>Similar to FormBuilder#array, except any implicitly constructed FormControl
will be non-nullable (i.e. it will have nonNullable set to true). Note
that already-constructed controls will not be altered.
T[]FormArray<ɵElement<T, never>>control
FormControl<T>Similar to FormBuilder#control, except this overridden version of control forces
nonNullable to be true, resulting in the control always being non-nullable.
FormControl<T>