Currently, I have a column connected to a field
known as state
. The possible values for this field are either S
or L
. My objective is to map these values as follows:
S
=> Short
,
L
=> Long
The binding is structured in the following way:
$scope.gridOptions = {
enableSorting: true,
enableFiltering: true,
enableHorizontalScrollbar: 0,
columnDefs: [
{name: 'action', field: 'state', width: 110, enableFiltering: false}
]
};
Although I am currently utilizing cellclass
and celltemplating
, each of them serves the purpose of applying classes or binding events respectively. How can I set the cell value based on an ng-if
condition?