How to detect the change of a value in an AngularJS table? -


i using standard ng-repeat display info.

the markup starts this:

<tr ng-repeat="p in currentpicks |filter:searchquery | orderby:['mcu','psn','litm']" bs-pop>                                 <td>{{$index+1}}</td>                                 <td>{{p.mcu}}</td>                                 <td>                                     {{p.psn}} 

i need every time when p.psn changes row styling:

enter image description here

additional info: what need every time table created "catch" changing p.psn , add styling define change. have data $http, , need discriminate table rows when filed changes value.

how can it?

<tr ng-repeat="p in currentpicks ...." ng-class="{'special': isspecial(p)}" .... 

css

.special {   background-color: red; } 

script

$scope.isspecial = function(pick) {       return pick.psn > 1000; //whatever condition }; 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -