Copying & setting status of a Group of Checkboxes in Angular

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.

CheckAll
Python Angular JQuery

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

Post your comments , suggestion , error , requirements etc here

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer