How can I hide/remove the containing <div> element when the value is empty:
<div class="small" ng-show="ID !== ''">{{ info.ID }} | </div>
Renders:
<div class="small">|</div>
Can I remove the <div> completely if empty? I've tried:
<div class="small" ng-show="!ID">{{ info.ID }}</div >
You are checking value of
IDproperty which is not theIDwithininfoobject so useinfo.IDwithin theng-show.If you don't want to render the element itself then use
ng-ifdirective sinceng-showdirective simply hide using some CSS.