I have table with ng-repeat values which I fetch from mysql(Codeigniter). and this table has checkbox which I select to create a JSON.
<tr ng-repeat="subject in subject_list | orderBy: 'sub_branch' | filter: search_subject">
<td><input type="checkbox"
ng-true-value="{{subject.sub_id}}"
ng-model="checkmodel.subject.sub_id"
ng-true-value="subject.sub_id"
ng-name="subject_name"></td>
<td>{{subject.sub_name}}</td>
<td>{{subject.sub_branch}}</td>
<td>{{subject.sub_code}}</td>
<td>{{subject.sub_sem}}</td>
<td><select ng-model="checkmodel.subject.section" ng-disabled="!checkmodel.subject.sub_id">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select></td>
</tr>
Problem 1: I'm only able to select one checkbox.
Problem 2: When I select a value from dropdown, the same value automatically selected in other dropdown boxes.
Here is sample JSON: {"subject":{"sub_id":1,"section":"A"}}