I am looking to create a table cell with alternating color combinations based on specific conditions. Here is the code snippet:
<tr ng-repeat="x in data">
<td>
<span ng-if="((x.time2 < x.time1) || (x.time2 < x.time3))" ng-style="color:red" {{x.val}}></span>
<span ng-if="((x.time2 === x.time1) && (x.time2 === x.time3)" ng-style="color:blue" {{x.val}}></span>
</td>
</tr>
However, I'm facing an issue where the value is not displaying in red even though x.time2 is less than x.time1. Sample time values are time1="2017-03-15 06:06:56", time2="2017-03-08 07:09:40" and time3="2017-03-08 07:09:40". All time values are in string format.