Source Code

check all and uncheck all checkbox in AngularJs

select all checkboxes angularjs - Select All | Unselect All Example

The checking the master checkbox (select/deselect)should check all click the other child checkboxes or unchecking deselect the master checkbox should uncheck all deselect the other child checkboxes.

No Select All Angularjs Product
{{$index + 1}} {{item.Name}}

Example : index.html



<!DOCTYPE html>
<html lang="en">
<head>
<title>AngularJs Check All Uncheck All | Select All | Unselect All Example</title>
 <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script>
</head>
<body>  
<div ng-app="liveApp">  
<div ng-controller="myController"> 
 <p>The checking the master checkbox (select/deselect)should check all click the other child checkboxes or unchecking deselect the master checkbox should uncheck all deselect the other child checkboxes.</p>
<table class="table">
	<tr>
	<th><input type="checkbox" ng-model="selectedAll"  />Select All Angularjs Product </th>    
	</tr>
	<tr ng-repeat="item in Items">
		<td>
			<input type="checkbox" ng-checked="selectedAll" />{{item.Name}}
		</td>
	</tr>
</table>
</div> 
</div>
</body>  
</html>  

Example : App.js


var liveApp = angular.module("liveApp", []);
 liveApp.controller("myController", function($scope) {
  $scope.Items = [{
        Name: "Anularjs Example"
    }, {
        Name: "Anularjs Download"
    }, {
        Name: "Anularjs Project"
    }, {
        Name: "Anularjs with Laravel"
    }, {
        Name: "Anularjs Tutorial"
    }, {
        Name: "Anularjs Free"
    }, {
        Name: "Anularjs Demo"
    },{
        Name: "Anularjs with PHP"
    }];

});