Lets assume we have the following setup (bellow), I want the table to have 5 cells, which it will, but i want the 5 cells to have a dynamic color range which goes from green to red (1 = green, 3 = yellow, 5 = red, ect)
The only technologies I am allowed to work with is : CSS3 / HTML5 / Angular - I am allowed to work with any angular lib
In excel its trivial doing this, but since im fairly new to angular, i'm admittedly a bit lost.
~ Script
var arrayWith5Values = [1,2,3,4,5]
~
<table>
<tr>
<td ng-repeat='numericValue in arrayWith5Values'>
{{numericValue}}}
</td>
</tr>
</table>
It's basicly the angular version of this question : Coloring HTML table cells from "Low to High Color Shades" depending on Cell Value in Python HTML Email and this Color Cell Based on Value in Cell
I have been searching StackOverflow for the majority of last night and could not find an answer.
Here is an example (screenshot from excel)