Hi I have created a table using scrollable-table and now I need to add a checkbox in the table for every row. How to change the value of the checkbox to checked/unchecked based on the value of the model. i.e if the value of the model is true which I am getting from mysql table then the checkbox should be checked for the particular row. The other values which are false should remain false.
In scrollable-table to change the state of the check box based on the model value
55 Views Asked by Janani S At
2
There are 2 best solutions below
0

The mistake I made was when comparing for checked value ng-model was in string and for checkbox it is boolean value. So I should have given that inside quotes while checking. This is the syntax now I have used.
<input type="checkbox" id="'#toggleeventtoggleApp_' + $Index" ng-true-value="'true'" ng-false-value="'false'" ng-model="x.userinput" ng-change="AutoStartToggle($index,x);"><br>
//==This is just an example code (not test yet). Hope to help you!