Check Uncheck All Checkbox using ReactJS

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.

  How to Create AngularJS UI-Grid Editable - GridView

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 :

  How to Get last inserted ID using Laravel

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.

Leave a Reply

avatar
  Subscribe  
Notify of