jeudi 26 novembre 2015

AngularJs Checkbox Function

I want to when checkbox true background-color lightblue checkbox false background-color normal Thank you.

<tr ng-repeat="item in rows | filter:search" ng-class="{'selected':$index == selectedRow}">

My Checkbox:

<td><input type="checkbox" ng-click="setClickedRow($index)"></td>

My Function:

      $scope.selected = null;  
      $scope.setClickedRow = function(index){  
      $scope.selectedRow = index;
    }




Aucun commentaire:

Enregistrer un commentaire