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:  how to get javascript variable value in php in same page?

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:  Composer dump-autoload in PHP

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:  css disable button
  2. Read Also:  SQL Remove Numeric Characters in String
  3. Read Also:  How to fill an AngularJS form loading data via XMLHttpRequest?
  4. Read Also:  PHP Array Length size count Function with Example
  5. Read Also:  jquery datetimepicker change Date format Dynamically
  6. Read Also:  Angularjs multiple Check and uncheck all checkbox
  7. Read Also:  Check if Checkbox Checked Unchecked using Angular Example
  8. Read Also:  Angular 6 Animation Tutorial with Examples
  9. Read Also:  print a specific area of the web page using jQuery
  10. Read Also:  StringsAreSorted function in GO language program