diff --git a/projects/common/components/input-elements/spell-correct.component.ts b/projects/common/components/input-elements/spell-correct.component.ts index 87301ec38d8532af2c92e591ba79216c3628b74d..649ba5064ae8bf3f2f23be3427636255f0526a8a 100644 --- a/projects/common/components/input-elements/spell-correct.component.ts +++ b/projects/common/components/input-elements/spell-correct.component.ts @@ -2,8 +2,8 @@ import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { MatInput } from '@angular/material/input'; -import { FormElementComponent } from '../../directives/form-element-component.directive'; import { SpellCorrectElement } from 'common/models/elements/input-elements/spell-correct'; +import { FormElementComponent } from '../../directives/form-element-component.directive'; @Component({ selector: 'aspect-spell-correct', @@ -52,12 +52,16 @@ import { SpellCorrectElement } from 'common/models/elements/input-elements/spell (elementFormControl && elementFormControl.value === '') ? 'line-through' : ''" (click)="elementFormControl.value === null ? - inputElement.focus() : - buttonElement.focus(); - elementFormControl.value === null ? - (elementFormControl.setValue('')) : - elementFormControl.setValue(null)">{{elementModel.label}} + inputElement.focus() : + buttonElement.focus(); + elementFormControl.value === null ? + elementFormControl.setValue('') : + elementFormControl.setValue(null)"> + {{elementModel.label}} </button> + <mat-error *ngIf="elementFormControl.errors && elementFormControl.touched"> + {{elementFormControl.errors | errorTransform: elementModel}} + </mat-error> </div> </div> `,