Want to hide below element if x.phone2 is null.
<div class="telePhone" ><strong>Phone2 :</strong> {{x.phone2}}</div>
Want to hide below element if x.phone2 is null.
<div class="telePhone" ><strong>Phone2 :</strong> {{x.phone2}}</div>
You can use ng-if for that (docs):
<div class="telePhone" ng-if="x.phone2"><strong>Phone2 :</strong> {{x.phone2}}</div>
If want to hide it and don't need two way binding use:
<div class="telePhone" ng-if="x.phone"><strong>Phone2 :</strong> {{x.phone2}}</div>
If you still need two way binding use:
<div class="telePhone" ng-show="x.phone"><strong>Phone2 :</strong> {{x.phone2}}</div>
Using ng-if will lower you overhead, but if you need to show the div if the x.phone value changes, you need to use ng-show.