Ng-Checked-4

 

Another example of Ng-Checked

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body ng-app="checkedExample"> <div ng-controller="ExampleController"> <div class="container"> Click to select or deselect All: <input type="checkbox" ng-model="master"> <br /> <br />Check1: <input type="checkbox" ng-checked="master" ng-model="Check1"> <br />Check2: <input type="checkbox" ng-checked="master" ng-model="Check2"> <br />Check3: <input type="checkbox" ng-checked="master" ng-model="Check3"> <hr /> <br /> <b>master = {{master}}</b> <br /> <b>Check1 = {{Check1}}</b> <br /> <b>Check2 = {{Check2}}</b> <br /> <b>Check3 = {{Check3}}</b> </div> </div> <script> var app = angular.module("checkedExample", []); app.controller('ExampleController', ['$scope', function ($scope) { }]); </script> </body> </html>
Output