Suppose my model has some info field and this info could have a "prop" property.
I am rendering a div and would like it to have an attribute with the value of that property.
This is simple enough using <div attr="{{info.prop}}"></div>.
But if info does not have the prop or has it with a null value it renders
<div attr></div>
How can I prevent attr from being added to the div?
And in a more general way how can I examine the model and add the attribute only if some conditions apply?
I suppose I could have the model include a special function in the scope and use <div {{attrGetter()}}"></div> or <div {{attrGetter(info.prop)}}"></div> and have this logic in the controller.
But I wanted to know if there are better/other ways to do this.