Angular Version: 6.1
I\'m trying to implement a custom control using what Kara Erickson is calling a Composite ControlValueAccessor as shown in the presentation, An
writeValue is called when you are changing control value (eg by setting backing ngModel property or controll value) not by user input.
https://stackblitz.com/edit/angular-hu2bfs?file=src/app/app.module.ts
I have removed errors caused by misused ngModel
As you can see, if you type into extra input new value and push the button, writeValue is called.
to wrap it up - writeValue is called when controller changes model value, and writeValue purpose is to do required stuff to reflect model changes by custom control.