Check all checkboxes in Angular js

Today, We want to share with you Check all checkboxes in Angular js.In this post we will show you Check All , UnCheck All – AngularJs, hear for How to Select / Deselect All Checkboxes using AngularJS we will give you demo and example for implement.In this post, we will learn about Check uncheck all Multiple Checkboxes with AngularJS with an example.

Check all checkboxes in Angular js

There are the Following The simple About Check all checkboxes in Angular js Full Information With Example and source code.

Read Also:  $digest() Function using Angular Example

As I will cover this Post with live Working example to develop Select all and Deselect all checkboxes in angularjs, so the Select and Deselect All Checkboxes using AngularJS for this example is following below.

Example 1: check uncheck all checkbox angularjs

<!doctype html>
<html>
<head>
  <title>Check and uncheck all checkbox using Angularjs - pakainfo.com</title>
 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
  
<body ng-app='myShop'>
  
  <div ng-controller="shopAppController">
    <input type='checkbox' value='' ng-model='selectall' >Check/Uncheck All<br/>
    <input type='checkbox' ng-checked="selectall" >Mobile<br/>
    <input type='checkbox' ng-checked="selectall">Iphone<br/>
    <input type='checkbox' ng-checked="selectall">Laptop<br/>
    <input type='checkbox' ng-checked="selectall" >Bike<br/>
  </div>
  
</body>
  
<script type="text/javascript">
  
   var app = angular.module('myShop', []);
  
   app.controller('shopAppController', ['$scope', '$http', function ($scope, $http) {
   }]);
  
</script>
</html>

Example 2: check all uncheck all checkbox angularjs

<!doctype html>
<html>
<head>
  <title>Check and uncheck all checkbox using Angularjs - pakainfo.com</title>
 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
  
<body ng-app='myShop'>
  <div ng-controller="shopAppController">
    
    <input type='button' id='but_selectall' value='Check all' ng-click='selectall()'>
    <input type='button' id='but_unselectall' value='Uncheck all' ng-click='unselectall()'>
    <br/>
  
    <input type='checkbox' ng-checked="selectall" >Laravel<br/>
    <input type='checkbox' ng-checked="selectall">Magento<br/>
    <input type='checkbox' ng-checked="selectall">PHP<br/>
    <input type='checkbox' ng-checked="selectall" >Node.JS<br/>
  
  </div>
</body>
  
<script type="text/javascript">
  
   var app = angular.module('myShop', []);
  
   app.controller('shopAppController', ['$scope', '$http', function ($scope, $http) {
   
    $scope.selectall = function(){
     $scope.selectall = true;
    }
  
    $scope.deselectall = function(){
     $scope.selectall = false;
    }
   
   }]);
  
</script>
</html>

Web Programming Tutorials Example with Demo

Read :

Read Also:  Bootstrap Add Space(padding) Between Rows

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Check all checkboxes in Angular js.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Check if Checkbox Checked Unchecked using Angular Example
  2. Read Also:  ajax live search table generation using codeigniter
  3. Read Also:  How to Get Current Date & Time in Python
  4. Read Also:  jQuery Check Uncheck All Checkbox Examples
  5. Read Also:  javascript GET Load data from json file
  6. Read Also:  vue js Shorthand If/Else Using Ternary Operators (?:)
  7. Read Also:  Angularjs multiple Check and uncheck all checkbox
  8. Read Also:  call to undefined function str_slug()
  9. Read Also:  How to Create Flexify Image using PHP
  10. Read Also:  Laravel JSON Encode Decode Handling
CLOSEX