I'm developing an AngularJS Ionic Meteor app, and I need to change the background color of the botton box of an ionic card depending of it contents (a float). The ranges are:
data<=80
81 < data <= 160
161 < data <= 233
234 < data<= 317
318 < data <= 400.
Is there a CSS way to do it, or an AngularJS way instead?
You could use ngClass. Just setup your CSS background-color properties and set in your controller the appropriate class, for example:
You could also implement the conditional statements in your HTML elements: