vellattukudy vellattukudy - 2 years ago 82
AngularJS Question

ng-change to change the td background-color if the selected value is greater than 6

Hi I have the following code, it's basically a td with select field. The list inside the select field have values range from 1-10. How can I change the background-color of the td if the selected value is greater than 6?

<select class="form-control" ng-model="l.o_value" ng-change="getRpn(k)"
ng-options="o.rank as (o.rank+o.generic_value) for o in occ_list">

Answer Source

Hi referthis link

<td ng-class="{ 'bg-red': item.code > 6 }">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download