Ionic checkbox check all and uncheck all checkboxes Angularjs

Ionic checkbox check all and uncheck all checkboxes Angularjs

In this Post We Will Explain About is Ionic checkbox check all and uncheck all checkboxes Angularjs With Example and Demo.

Welcome on infinityknow.com – Examples ,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Ionic checkbox with ng repeat with only one item selected

In this post we will show you Best way to implement Ionic – How to do Check All with Ion-Checkbox, hear for How to Ionic checkbox with ng repeat with only one item selected with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

READ :  Simple Angular hello world Application

AngularJS with Ionic Controller Code to Check All

in this below source code, we have a list of employer (name) with check boxes.as well as What we want is to achieve all the simple “check all” when we check one simple checkbox. $scope.allemployer using angularjs is a temporary object to get all the check box value capture the checkbox checked value.here show to Ion-checkbox in an ion-list prevents ion-option-button from showing ionic using AngularJS.

$scope.allemployer = {};
$scope.allemployer.checked = false;
$scope.checkAll = function() {
      if ($scope.allemployer.checked) {
        $scope.allemployer.checked = true;
      } else {
        $scope.allemployer.checked = false;
      }
    for (var i=0; i < $scope.employer.length; i++) {
      $scope.employer[i].checked = $scope.allemployer.checked;
    };
};	

HTML Code including Ion-Checkbox to Achieve “”Check All””


        All Contacts
      
      
        <h2>{{empdel.name}}</h2>
      

Example

READ :  Angular check all and uncheck all checkbox

I hope you have Got ionic framework – How to check ion-checkbox from database And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.

Add a Comment

Your email address will not be published. Required fields are marked *