Here is a solution am using with anular 6.
[readonly]="DateRelatedObject.bool_DatesEdit ? true : false"
plus above given answer
[attr.disabled]="valid == true ? true : null"
did't work for me plus be aware of using null cause it's expecting bool.