Cannot assign to 'value' because it is a constant or a read-only property. Angular 6

It's not allowed to set value like you are trying. You need to either use setValue or patchValue methods.

https://angular.io/api/forms/FormControl#setvalue

https://angular.io/api/forms/FormControl#patchvalue

For FormControl they're identical, but those methods work differently for i.e. FormGroup.


That is not the way to set value. Correct way to set is using setValue() or patchValue()

this.myControl.setValue('contact');