File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,20 @@ Sin `NgxControlError`:
4040</label >
4141```
4242
43+ En un formulario también puedes pasar el nombre del control en lugar de la instancia.
44+
45+ ``` html
46+ <form [formGroup] =" form" >
47+ <label >
48+ <b >Nombre</b >
49+ <input type =" text" formControlName =" name" />
50+ <strong *ngxControlError =" 'name'; track: 'required'" >
51+ Se requiere el nombre.
52+ </strong >
53+ </label >
54+ </form >
55+ ```
56+
4357## Configuración
4458
4559Un ` StateMatcher ` define cuándo el control proporcionado está en un _ estado de error_ .
Original file line number Diff line number Diff line change @@ -38,6 +38,20 @@ without `NgxControlError`:
3838</label >
3939```
4040
41+ In a form you can also pass the name of the control instead of the instance.
42+
43+ ``` html
44+ <form [formGroup] =" form" >
45+ <label >
46+ <b >Name</b >
47+ <input type =" text" formControlName =" name" />
48+ <strong *ngxControlError =" 'name'; track: 'required'" >
49+ Name is required.
50+ </strong >
51+ </label >
52+ </form >
53+ ```
54+
4155## Configuration
4256
4357A ` StateMatcher ` defines when the provided control is in an _ error state_ .
You can’t perform that action at this time.
0 commit comments