I am struggling to display a button in my ui-grid only when the field value is not an empty string. I attempted using the ng-if
directive, but it is not functioning as expected. Below is the snippet from my grid options:
{ field: 'ReleaseStatus',
width: 125,
displayName: 'Release Status',
cellTemplate:
'<div ng-if="row.entity.ReleaseStatus != """>
<button id="editBtn"
type="button"
class="btn btn-default"
data-toggle="modal"
data-target="#myModal"
ng-click="grid.appScope.launch(row)">
{{COL_FIELD}}
</button>
</div>'
},
Although the button works fine without ng-if
, I need it to be hidden when the ReleaseStatus field is an empty string. Any help on this issue would be highly appreciated.