javascript - How to get table row data using check box in Angular.js -
i need 1 help.i need checked data table row using angular.js. explaining code below.
<tr ng-repeat="gl in gallerydatas"> <td><input type="checkbox" name=""> {{$index+1}}</td> <td><img ng-src="upload/{{gl.image}}" border="0" name="image" style="width:100px; height:100px;" /></td> <td>{{gl.description}}</td> </tr>
here need while user clicked check box respective row data retrieving array.please me.
use ng-change on checkbox
<td><input type="checkbox" ng-change="clickedrow(gl.checked)" name="" ng-model="gl.checked"></td>
in controller,
$scope.clickedrow = function(checked) { if (checked) { //add list } else { // remove list } }
Comments
Post a Comment