In my case with Angular 8. I wanted to toggle enable/disable of the input depending on the condition.
[attr.disabled]
didn't work for me so here is my solution.
I removed [attr.disabled]
from HTML and in the component function performed this check:
if (condition) {
this.form.controls.myField.disable();
} else {
this.form.controls.myField.enable();
}