{ "id": "api/forms/ReactiveFormsModule", "title": "ReactiveFormsModule", "contents": "\n\n
\n
\n
\n \n API > @angular/forms\n
\n \n
\n \n
\n

ReactiveFormsModulelink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

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

\n\n

See more...

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

See alsolink

\n \n
\n\n\n \n \n \n
\n

Descriptionlink

\n

Providers associated with this module:

\n\n\n \n
\n\n \n\n \n\n
\n

Static methodslink

\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n withConfig()\n \n link

\n \n
\n
\n

Provides options for configuring the reactive forms module.

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

An object of configuration options

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

ModuleWithProviders<ReactiveFormsModule>

\n\n \n\n\n \n\n \n
\n
\n\n \n
\n\n \n\n \n\n\n \n\n\n \n\n \n \n
\n

Directiveslink

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameDescription
\n \n CheckboxControlValueAccessor\n \n \n \n

A ControlValueAccessor for writing a value and listening to changes on a checkbox input\nelement.

\n\n
\n \n CheckboxRequiredValidator\n \n \n \n

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

\n\n
\n \n DefaultValueAccessor\n \n \n \n

The default ControlValueAccessor for writing a value and listening to changes on input\nelements. The accessor is used by the FormControlDirective, FormControlName, and\nNgModel directives.

\n\n
\n \n EmailValidator\n \n \n \n

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

\n\n
\n \n FormArrayName\n \n \n \n

Syncs a nested FormArray to a DOM element.

\n\n
\n \n FormControlDirective\n \n \n \n

Synchronizes a standalone FormControl instance to a form control element.

\n\n
\n \n FormControlName\n \n \n \n

Syncs a FormControl in an existing FormGroup to a form control\nelement by name.

\n\n
\n \n FormGroupDirective\n \n \n \n

Binds an existing FormGroup to a DOM element.

\n\n
\n \n FormGroupName\n \n \n \n

Syncs a nested FormGroup to a DOM element.

\n\n
\n \n MaxLengthValidator\n \n \n \n

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

\n\n
\n \n MaxValidator\n \n \n \n

A directive which installs the MaxValidator for any formControlName,\nformControl, or control with ngModel that also has a max attribute.

\n\n
\n \n MinLengthValidator\n \n \n \n

A directive that adds minimum length validation to controls marked with the\nminlength attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

\n\n
\n \n MinValidator\n \n \n \n

A directive which installs the MinValidator for any formControlName,\nformControl, or control with ngModel that also has a min attribute.

\n\n
\n \n NgControlStatus\n \n \n \n

Directive automatically applied to Angular form controls that sets CSS classes\nbased on control status.

\n\n
\n \n NgControlStatusGroup\n \n \n \n

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

\n\n
\n \n NgSelectOption\n \n \n \n

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

\n\n
\n \n NumberValueAccessor\n \n \n \n

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

\n\n
\n \n PatternValidator\n \n \n \n

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

\n\n
\n \n RadioControlValueAccessor\n \n \n \n

The ControlValueAccessor for writing radio control values and listening to radio control\nchanges. The value accessor is used by the FormControlDirective, FormControlName, and\nNgModel directives.

\n\n
\n \n RangeValueAccessor\n \n \n \n

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

\n\n
\n \n RequiredValidator\n \n \n \n

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

\n\n
\n \n SelectControlValueAccessor\n \n \n \n

The ControlValueAccessor for writing select control values and listening to select control\nchanges. The value accessor is used by the FormControlDirective, FormControlName, and\nNgModel directives.

\n\n
\n \n SelectMultipleControlValueAccessor\n \n \n \n

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

\n\n
\n
\n\n \n \n\n\n \n\n\n
\n
\n\n\n" }