What is the best way to conditionally apply attributes in Angular

Adding an attribute based on certain condition in angular can be done as follows in angular:
<div contenteditable="{{ condition ? 'true' : 'false'}}"></div>
This allows us to set a condition, which controls whether a certain attribute is applied or not. Since ternary operator is well supported by angular, we can use it to control applicability of attributes and classes as well.
<div class="{{ condition ? 'class1' : ''}}"></div>
NOTE The above class can also be set using ng-class in angular:
<div ng-class="{{ class1? condition}}"></div>