I need of making a angularjs code where on change of select causes appropriate checkeboxes to be marked. I am having around 200 records on a page. For eg If I have 50, 100 and 200 numbers in the drop down. Based on the selection of option the number of records needs to be checked. Means If I select 50 from drop down then 50 records needs to be checked automatically. Can anyone please help me in acheiving this functionality, thanks in advance.
Here is my HTML:
<div style="float:left;">
<label class="col-sm-2 control-label">To:</label>
<div class="col-sm-4">
<select class="form-control" ng-model="option.type" ng-change="" id="selection" />
<option value="">Select an Option</option>
<option ng-repeat="option in typeOptionsselect" value="{option.value}}">{{option.name}}</option>
</select>
</div>
</div>
<tr ng-repeat="person in lead | orderBy:predicate:reverse | filter:searchText " class="tHi" >
<td style="text-align:center"><input type="checkbox" ng-checked="master" name="ids[]" id="ids" value="{{person.fId}}"/></td>
<td ng-click="editItem(person.fId)">{{person.companyname}}</td>
<td ng-click="editItem(person.fId)">{{person.firstname}}</td>
<td ng-click="editItem(person.fId)">{{person.lastname}}</td>
<td ng-click="editItem(person.fId)">{{person.address1}}</td>
<td ng-click="editItem(person.fId)">{{person.city}}</td>
<td ng-click="editItem(person.fId)">{{person.reprsent}}</td>
<td ng-click="editItem(person.fId)">{{person.cemail}}</td>
</tr>
$scope.typeOptionsselect = [ {
name: '50',
value: '50'
}, {
name: '100',
value: '100'
}, {
name: '200',
value: '200'
}];