I have a table created with an ng-repeat, based on a returned dataset. What I want to do is change the text colour in a cell, not row, based on a formula. i.e. if the value is less that 500 then red text.
I’m assuming I can use something like ng-class="{‘class’: expession}". If this correct, or should I use something like ng-style
Tim
I thought the correct syntax is
ng-style="{‘color’: x[14] < (x[6] - (x[6] * .05))? ‘Red’:‘Black’}"
Note the quotes around the color since attribute can have a ‘-‘ e.g. ‘padding-top’ the minus if not in quotes is not going to work best to keep it in quotes all the time I think.
Ilia