Ng-Disable-9

 

In this example of ng-disable directive we have two checkboxes one for application form and other for id proof if both are checked then you can activate internet banking means the the button "Active Internet Banking" will only enable if both the checkboxes are checked.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app="app"> <div ng-controller="controllerName"> <h3>Application Form <input type="checkbox" ng-model="check" /></h3> <h3>Id Proof<input type="checkbox" ng-model="check2" /> </h3> <br /> <button type="button" ng-disabled="!(check && check2)">Activate Internet Banking</button> </div> <script> var app = angular.module("app", []); app.controller('controllerName', ['$scope', function ($scope) { $scope.disableClick = function (isDisabled) { $scope.isDisabled = !isDisabled; } }]); </script> </body> </html>
Output