|
28 | 28 |
|
29 | 29 | ---
|
30 | 30 |
|
31 |
| -## <a name="ngx-form-errors">ngxFormErrors directive |
| 31 | +## <a name="ngx-form-errors"></a>ngxFormErrors directive |
32 | 32 |
|
33 | 33 | This directive creates an Error component dynamically where the validation messages will be displayed. See [Defining the Error component to use](#defining-error-component).
|
34 | 34 |
|
35 |
| -### <a name="binding-form-control">Binding to a FormControl |
| 35 | +### <a name="binding-form-control"></a>Binding to a FormControl |
36 | 36 |
|
37 | 37 | Let's start by defining the Angular form group:
|
38 | 38 |
|
@@ -60,7 +60,7 @@ At runtime, the validation messages are displayed by the Error component that is
|
60 | 60 |
|
61 | 61 | Remember that you need to provide the Error component that will be created by this directive. See [Defining the Error component to use](#defining-error-component).
|
62 | 62 |
|
63 |
| -### <a name="validation-errors">Validation errors emitted |
| 63 | +### <a name="validation-errors"></a>Validation errors emitted |
64 | 64 |
|
65 | 65 | In order to display the validation messages in the Error component, the `ngxFormErrors` directive emits an array of error objects containing the following information:
|
66 | 66 |
|
@@ -198,7 +198,7 @@ Just wrap the `ngxFormErrors` directive inside a `<mat-error>` element and that'
|
198 | 198 | </form>
|
199 | 199 | ```
|
200 | 200 |
|
201 |
| -In fact, we have integrated [Angular Material](https://material.angular.io) in our [demo app](../demo-app). Check it out! |
| 201 | +In fact, we have integrated [Angular Material](https://material.angular.io) in our [demo app](https://github.com/NationalBankBelgium/ngx-form-errors/tree/master/demo-app). Check it out! |
202 | 202 |
|
203 | 203 | You can also integrate the directive with other UI libraries. This is really simple since you just need to use an `<ng-template>` element to use the `ngxFormErrors` directive so you can place it anywhere in the template according to your needs :wink:
|
204 | 204 |
|
@@ -385,7 +385,7 @@ formErrorsMessageService.addErrorMessages({
|
385 | 385 | });
|
386 | 386 | ```
|
387 | 387 |
|
388 |
| -In fact, we have integrated [ngx-translate](https://github.com/ngx-translate/core) in our [demo app](../demo-app). Check it out! |
| 388 | +In fact, we have integrated [ngx-translate](https://github.com/ngx-translate/core) in our [demo app](https://github.com/NationalBankBelgium/ngx-form-errors/tree/master/demo-app). Check it out! |
389 | 389 |
|
390 | 390 | The same functionality can be achieved with any other i18n library, you just need to integrate it in your Error component :wink:
|
391 | 391 |
|
@@ -466,7 +466,7 @@ getErrorMessages(): NgxValidationErrorMessages;
|
466 | 466 | findErrorMessage(error: string, formControlName?: string, group?: string): string | undefined;
|
467 | 467 | ```
|
468 | 468 |
|
469 |
| -### <a name="adding-alias-globally-for-form-controls">Adding field names or alias globally |
| 469 | +### <a name="adding-alias-globally-for-form-controls"></a>Adding field names or alias globally |
470 | 470 |
|
471 | 471 | Sometimes the names of the fields in your model (and therefore in your form) are not really descriptive for the end user,
|
472 | 472 | in those cases you might want to display better error messages with meaningful field names.
|
|
0 commit comments