ReadonlycontrolTracks the name of the FormControl bound to the directive. The name corresponds
to a key in the parent FormGroup or FormArray.
Accepts a name as a string or a number.
The name in the form of a string is useful for individual forms,
while the numerical form allows for form controls to be bound
to indices when iterating over controls in a FormArray.
StaticɵdirStaticɵfacThe code of the error to check
Optionalpath: string | (string | number)[]A list of control names that designates how to move from the current control to the control that should be queried for errors.
error data for that particular error. If the control or error is not present, null is returned.
For example, for the following FormGroup:
form = new FormGroup({
address: new FormGroup({ street: new FormControl() })
});
The path to the 'street' control from the root form would be 'address' -> 'street'.
It can be provided to this method in one of two formats:
['address', 'street']'address.street'The code of the error to check
Optionalpath: string | (string | number)[]A list of control names that designates how to move from the current control to the control that should be queried for errors.
whether the given error is present in the control at the given path.
If the control is not present, false is returned.
For example, for the following FormGroup:
form = new FormGroup({
address: new FormGroup({ street: new FormControl() })
});
The path to the 'street' control from the root form would be 'address' -> 'street'.
It can be provided to this method in one of two formats:
['address', 'street']'address.street'If no path is given, this method checks for the error on the current control.
@docs-private
@docs-private
A full exertion of FormControlName from @angular/forms. The only change is the ability to access the control container outside of the current component
Deprecated
use the ParentControlContainerDirective