angular 8 add attribute conditionally code example Example: angular add html attribute on condition <input [attr.attribute] = "condition ? '' : null" />