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

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -