ReactiveFormsModule

From Get docs
< @angular/formsAngular/docs/8/api/forms/reactiveformsmodule


ReactiveFormsModule

ngmodule

Exports the required infrastructure and directives for reactive forms, making them available for import by NgModules that import this module.

class ReactiveFormsModule {
  static withConfig(opts: { warnOnNgModelWithFormControl: "never" | "once" | "always"; }): ModuleWithProviders<ReactiveFormsModule>
}

See also

Static methods

Provides options for configuring the reactive forms module.

static withConfig(opts: { warnOnNgModelWithFormControl: "never" | "once" | "always"; }): ModuleWithProviders<ReactiveFormsModule>

Parameters
opts object

An object of configuration options

  • warnOnNgModelWithFormControl Configures when to emit a warning when an ngModel binding is used with reactive form directives.
Returns

ModuleWithProviders<ReactiveFormsModule>


Providers

Provider
FormBuilder
RadioControlRegistry

Directives

Name Description

../checkboxcontrolvalueaccessor

CheckboxControlValueAccessor
A ControlValueAccessor for writing a value and listening to changes on a checkbox input element.

../checkboxrequiredvalidator

CheckboxRequiredValidator
A Directive that adds the required validator to checkbox controls marked with the required attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

../defaultvalueaccessor

DefaultValueAccessor
The default ControlValueAccessor for writing a value and listening to changes on input elements. The accessor is used by the FormControlDirective, FormControlName, and NgModel directives.

../emailvalidator

EmailValidator
A directive that adds the email validator to controls marked with the email attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

../formarrayname

FormArrayName
Syncs a nested FormArray to a DOM element.

../formcontroldirective

FormControlDirective
  • Syncs a standalone FormControl instance to a form control element.

../formcontrolname

FormControlName
Syncs a FormControl in an existing FormGroup to a form control element by name.

../formgroupdirective

FormGroupDirective
Binds an existing FormGroup to a DOM element.

../formgroupname

FormGroupName
Syncs a nested FormGroup to a DOM element.

../maxlengthvalidator

MaxLengthValidator
A directive that adds max length validation to controls marked with the maxlength attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

../minlengthvalidator

MinLengthValidator
A directive that adds minimum length validation to controls marked with the minlength attribute. The directive is provided with the NG_VALIDATORS mult-provider list.

../ngcontrolstatus

NgControlStatus
Directive automatically applied to Angular form controls that sets CSS classes based on control status.

../ngcontrolstatusgroup

NgControlStatusGroup
Directive automatically applied to Angular form groups that sets CSS classes based on control status (valid/invalid/dirty/etc).

../ngselectoption

NgSelectOption
Marks <option> as dynamic, so Angular can be notified when options change.

../numbervalueaccessor

NumberValueAccessor
The ControlValueAccessor for writing a number value and listening to number input changes. The value accessor is used by the FormControlDirective, FormControlName, and NgModel directives.

../patternvalidator

PatternValidator
A directive that adds regex pattern validation to controls marked with the pattern attribute. The regex must match the entire control value. The directive is provided with the NG_VALIDATORS multi-provider list.

../radiocontrolvalueaccessor

RadioControlValueAccessor
The ControlValueAccessor for writing radio control values and listening to radio control changes. The value accessor is used by the FormControlDirective, FormControlName, and NgModel directives.

../rangevalueaccessor

RangeValueAccessor
The ControlValueAccessor for writing a range value and listening to range input changes. The value accessor is used by the FormControlDirective, FormControlName, and NgModel directives.

../requiredvalidator

RequiredValidator
A directive that adds the required validator to any controls marked with the required attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

../selectcontrolvalueaccessor

SelectControlValueAccessor
The ControlValueAccessor for writing select control values and listening to select control changes. The value accessor is used by the FormControlDirective, FormControlName, and NgModel directives.

../selectmultiplecontrolvalueaccessor

SelectMultipleControlValueAccessor
The ControlValueAccessor for writing multi-select control values and listening to multi-select control changes. The value accessor is used by the FormControlDirective, FormControlName, and NgModel directives.


© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v8.angular.io/api/forms/ReactiveFormsModule