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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -