AngularJS Check Checkbox is checked or not

By Hardik Savani | November 15, 2018 | Category : Angular

Here, i want to show you how to check checkbox is checked or not in angular js app. i will give you simple example to check checkbox is checked or not using ng-app, ng-controller, ng-model and ng-click in angularjs.

it is a simple example that will help to detect checkbox is checked or not. so if you want to quick check then check also demo and also copy bellow html code for check if checkbox is selected.


<!doctype html>



<title>AngularJS Check Checkbox is checked or not -</title>

<script src=""></script>


<body ng-app='myapp'>

<div ng-controller="appCtrl">

<input type='checkbox' value='1' ng-model='checkboxEl'><br>

<input type='button' ng-click='checkVal()' value='Click'>


Result : <span >{{ result }}</span>



<script type="text/javascript">

var app = angular.module('myapp', []);

app.controller('appCtrl', ['$scope', '$http', function ($scope, $http) {

$scope.checkVal = function(){

if ($scope.checkboxEl) {

$scope.result = "Checkbox is checked";

} else {

$scope.result = "Checkbox is not checked";






I hope it can help you....

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: