Is it possible to apply a css class depending on the value of the aura:attribute in a lightning component?
For instance I have the following component.
<aura:component description="JustAComp">
<aura:attribute name="myAttr" type="Object"/>
<div aura:id="myDiv">
</div>
</aura:component>
Now I would like to apply a css class to myDiv
if myAttr.prop
is not null (or actually I would like to be able to apply a css class depending on boolean expressions composed of the properties of my attribute for example).
Is it possible to do what I want or should I use JavaScript for sure in this case?
Thank you.