Angularjs Examples

AJS Examples

AngularJS ng-Checked Directive

The AngularjS ng-checked directive is used to set checkbox checked.


<p ng-checked="value"></p> 

AngularJS ng-Checked Directive Example

<title>My first AngularJS checked Directive code</title>
<script SRC="">
//Defining Controller Using Standard Javascrip Object Constructor
function CustomerController($scope) {
$scope.checked = false;
<div ng-app="">
<div ng-controller="CustomerController"> 

Check Me: <input type="checkbox" ng-model="checked"><br/>
This Will Check Automatically: <input id="checkSlave" type="checkbox" ng-checked="checked">

See Live Example