Show hide elements in AngularJs html template based on $scope variable has value

Show hide elements in AngularJs html template based on if $scope variable has value: (the ng-show=model.property is the trick)

    <li class="List-item" ng-repeat="row in searchResult">
        <div class="List-itemBody">
            <strong ng-show="row.doc.ContactPerson">{{row.doc.ContactPerson}}</strong>
            <strong ng-show="row.doc.ContactPerson == null">[Contact Person Missing]</strong>

 

Leave a Reply

Your email address will not be published. Required fields are marked *