Answer the question
In order to leave comments, you need to log in
How to select all checkboxes in angular?
Tell me how in angular when you click the "select all" checkbox, all checkboxes become checked.
Answer the question
In order to leave comments, you need to log in
Here is the simplest example for you.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-checkbox-input-directive-production</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
</head>
<body ng-app="checkboxExample">
<script>
angular.module('checkboxExample', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.value1 = false;
}]);
</script>
<form name="myForm" ng-controller="ExampleController">
<input type="checkbox" id="all" ng-model="value1"><label for="all">выделить все</label>
<input type="checkbox" class="block" ng-checked="value1">
<input type="checkbox" class="block" ng-checked="value1">
<input type="checkbox" class="block" ng-checked="value1">
<input type="checkbox" class="block" ng-checked="value1">
</form>
</body>
</html>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question