Here you go. Refer this modified PLUNKER. Escaping single quote here but indenting the template for better readability.
<div class="ngCellText"
ng-class="{\'green\': row.getProperty(\'alert\') == \'true\' }">
{{ row.getProperty(col.field) }}
</div>
Above case is when alert is the string representation of booleans ("true"/"false"). When alert
is boolean, then the template becomes less clumsy:
<div class="ngCellText" ng-class="{\'green\': row.getProperty(\'alert\') }">
{{ row.getProperty(col.field) }}
</div>
UPDATE:
To reduce some verbosity going around there, we can directly use row.entity.alert
:
<div class="ngCellText"
ng-class="{\'green\': row.entity.alert == \'true\' }">
{{ row.getProperty(col.field) }}
</div>