<! DOCTYPE html>
<meta charset= "UTF-8" >
<link rel= "stylesheet" href= "Css/bootstrap.css" >
<title> Select All/deselect all </title>
<body>
<div class= "Container" ng-controller= "MYCTRL5" ><!--4, ng-controller= "MYCTRL5" Enable Controller--
<table class= "Table table-bordered" >
<thead>
<tr>
<th> selection </th>
<th> name </th>
<th> Operations </th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input ng-checked= "SelectAll" type= "checkbox" >
</td>
<td>Tom</td>
<td>
<button class= "btn btn-danger btn-xs" > Delete </button>
</td>
</tr>
<tr>
<td>
<input ng-checked= "SelectAll" type= "checkbox" >
</td>
<td>Mary</td>
<td>
<button class= "btn btn-danger btn-xs" > Delete </button>
</td>
</tr>
<tr>
<td>
<input ng-checked= "SelectAll" type= "checkbox" >
</td>
<td>King</td>
<td>
<button class= "btn btn-danger btn-xs" > Delete </button>
</td>
</tr>
</tbody>
</table>
<input type= "checkbox" ng-model= "SelectAll" >
<span ng-hide= "SelectAll" > Full selection </span>
<span ng-show= "SelectAll" > deselect Select All </span>
</div>
<script src= "Js/angular.js" ></script><!--1, introducing angularjs-->
<script>
2. Create custom modules and controllers
Angular.module (' myModule5 ', [' ng ']).
Controller (' MyCtrl5 ', function ($scope) {
});
</script>
</body>
Simple to use ANGULARJS: Select All and deselect all functions