I am trying to set an inputs disabled attribute to true if a property has a value, however what I am using now seems to be returning true if the property is null or an empty string.
[attr.disabled]="userForm.value.email? true: false"
I am trying to set an inputs disabled attribute to true if a property has a value, however what I am using now seems to be returning true if the property is null or an empty string.
[attr.disabled]="userForm.value.email? true: false"
To get an bound attribute removed, the value needs to be null
instead of false
[attr.disabled]="userForm.value.email? true: null"