<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<meta http-equiv= "x-ua-compatible" content= "Ie=edge"/>
<meta name= "viewport" content= "Width=device-width,initial-scale"/>
<title></title>
<meta charset= "Utf-8"/>
<link rel= "stylesheet" href= "Bootstrap-3.3.6-dist/css/bootstrap.min.css"/>
<body>
<div class= "Container" style= "padding:50px" >
<div data-ng-app= "myApp" data-ng-controller= "Myctrl" >
<button type= "button" data-ng-disabled= "Myswitch" data-ng-click= "alert (' Click the button! ') ' > button </button><br/>
<input type= "checkbox" data-ng-model= "Myswitch"/>
<p>{{mySwitch}}</p>
</div>
</div>
<script src= "Jquery/jquery-2.1.4.min.js" ></script>
<script src= "Bootstrap-3.3.6-dist/js/bootstrap.min.js" ></script>
<script src= "Http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js" ></script>
<script>
Angular.module ("myApp", []). Controller ("Myctrl", function ($scope) {$scope. Myswitch=true})
</script>
</body>
data-ng-disabled directive