There is one master or main checkbox, by changing the selection of this checkbox we can set or reset the selection of another group of checkboxes.
Python : {{Python}}, Angular : {{Angular}}, JQuery : {{JQuery}}
<div ng-app="my_app" ng-controller="my_ctrl">
<div class="container"><div class="row"><div class="col-3">
<input type=checkbox ng-model="Checkall" ng-change="onChange()"> CheckAll
</div><div class="col-6">
<input type=checkbox ng-model="Python" > Python
<input type=checkbox ng-model="Angular"> Angular
<input type=checkbox ng-model="JQuery" > JQuery
</div></div></div>
<br><br>
Python : {{Python}}, Angular : {{Angular}}, JQuery : {{JQuery}}
</div>
<script>
var app = angular.module('my_app', []);
app.controller('my_ctrl', function($scope) {
$scope.Python=false;
$scope.Angular=true;
$scope.JQuery=false;
$scope.onChange = function()
{
//var status=$scope.Checkall;
$scope.Python=$scope.Angular=$scope.JQuery=$scope.Checkall;
}
});
</script>
← Checkbox
←Angular Home