AngularJS - verify if checkbox is checked or not
![](https://markimarta.com/wp-content/uploads/2019/01/angular-150x150.png)
Snippet for AngularJS for working with checkbox controls. The task is to verify if checkbox is checked or not with AngularJS.
For single checkbox the solution looks like this. I will split it into two pieces.
HTML:
<input type="checkbox" ng-model="modelForCheckbox" ng-click="getCheck()" />
JAVASCRIPT:
moveApp.controller('changeDepCtrl', function ($scope, $http) { $scope.getCheck = function () { console.log($scope.modelForCheckbox); //if true, than checked, otherwise not checked } });