Maksym Zavorotynskyion Stack Overflow • Recommends
I am trying to implement a custom ControlValueAccessor as Kara Erickson recommended on last Angular Connect link to this video . To pass the validity state from the parent component to the child one.
app.component.html:
<app-country-select ngModel="model" name="country-select"></app-country-select>
country-select.component.html:
<select formControl="controlDir.control" #select placeholder="Country" i18n-placeholder (click)="onTouched()"
(change)="onChange($event.value)" required="required">
<option value="at">Austria</option>
<option value="au">Australia</option>
</select>
country-select.component.ts:
@Component({
selector: 'app-country-select',
templateUrl: './country-select.comp…