Is there a way to apply ng-class to automatically evaluate negative values within a < p > tag?
<p <strong>LW$:</strong> {{d.lw_metric}} <strong>LW:</strong> {{d.lw_metric_percentage}} <strong>L4W:</strong> {{d.l4w_metric}}</p>
I currently have the following CSS:
.positive{ color: green}
.negative{ color: red}
However, I am unsure how to instruct Angular to evaluate all the values inside the tag without specifying each one individually like this:
ng-class = "{'positive':data.merchMetrics.LW_CHG_LY >=0,'negative':data.merchMetrics.LW_CHG_LY <0}"
There are five expressions within this tag, so I believe there might be a more efficient approach.