angular_forms library

Classes

AbstractControl<T>
AbstractControlDirective<T extends AbstractControl>
Base class for control directives.
AbstractControlGroup<T>
Generic control group that allows creating your own group that is backed by a value that is not a Map.
AbstractNgForm<T extends AbstractControlGroup>
Abstract class to easily create forms that are template driven.
CheckboxControlValueAccessor
The accessor for writing a value and listening to changes on a checkbox input element.
Control<T>
Defines a part of a form that cannot be divided into other controls. Controls have values and validation state, which is determined by an optional validation function.
ControlArray
Defines a part of a form, of variable length, that can contain other controls.
ControlContainer<T extends AbstractControlGroup>
A directive that contains multiple NgControls contained in a AbstractControlGroup.
ControlGroup
Defines a part of a form, of fixed length, that can contain other controls.
ControlValueAccessor<T>
A bridge between a control and a native element.
DefaultValueAccessor
The default accessor for writing a value and listening to changes that is used by the NgModel, NgFormControl, and NgControlName directives.
Form
An interface that NgFormModel and NgForm implement.
FormBuilder
Creates a form object from a user-specified configuration.
MaxLengthValidator
A Directive adding minimum-length validator to controls with maxlength.
MemorizedForm
A form that will not remove controls if the control is taken out of the view for example with a NgIf.
MinLengthValidator
A Directive adding minimum-length validator to controls with minlength.
NgControl
A base class that all control directive extend. It binds a Control object to a DOM element.
NgControlGroup
Creates and binds a control group to a DOM element.
NgControlName
Creates and binds a control with a specified name to a DOM element.
NgControlStatus
Directive automatically applied to Angular forms that sets CSS classes based on control status (valid/invalid/dirty/etc).
NgForm
If NgForm is bound in a component, <form> elements in that component will be upgraded to use the Angular form system.
NgFormControl
Binds an existing Control to a DOM element.
NgFormModel
Binds an existing control group to a DOM element.
NgModel
Creates a form NgControl instance from a domain model and binds it to a form control element. The form NgControl instance tracks the value, user interaction, and validation status of the control and keeps the view synced with the model.
NgSelectOption
Marks <option> as dynamic, so Angular can be notified when options change.
NumberValueAccessor
The accessor for writing a number value and listening to changes that is used by the NgModel, NgFormControl, and NgControlName directives.
PatternValidator
A Directive that adds a pattern validator to any controls with pattern:
RadioButtonState
The value provided by the forms API for radio buttons.
RadioControlValueAccessor
The accessor for writing a radio control value and listening to changes that is used by the NgModel, NgFormControl, and NgControlName directives.
RequiredValidator
A Directive adding a required validator to controls with required:
SelectControlValueAccessor
The accessor for writing a value and listening to changes on a select element.
Validator
An interface to be implemented as classes acting as validators.
Validators
Provides a set of validators used by form controls.

Constants

formBindings → const List<Type>
See formProviders instead.
formDirectives → const List<Type>
A list of all the form directives used as part of a @Component annotation.
formProviders → const List<Type>
Shorthand set of providers used for building Angular forms.
ngValidators → const MultiToken<Object>
Providers for validators to be used for Controls in a form.
ngValueAccessor → const MultiToken<ControlValueAccessor>
Used to provide a ControlValueAccessor for form controls.

Functions

composeValidators(List? validators) ValidatorFn?
setUpControl(Control control, NgControl dir) → void
setUpControlGroup(AbstractControlGroup control, NgControlGroup dir) → void

Typedefs

ChangeFunction<T> = dynamic Function(T value, {String rawValue})
Type of the function to be called when the control receives a change event.
TouchFunction = dynamic Function()
Type of the function to be called when the control receives a touch event.
ValidatorFn = Map<String, dynamic>? Function(AbstractControl c)
Returns a map of the errors associated with this control.