Ng-Disable-7

 
In this example we have a checkbox for new user and when the checkbox is checked the accept terms and conditions with yes and no option shows and if you accept then the register button gets enable otherwise disable.
 
 
 
<!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> <div> <div> <label>New User?</label> <input type="checkbox" ng-model="isHide" /> </div> <div ng-show="isHide"> <label>Accept Terms and Conditions</label> <input type="radio" value=true name="bool" ng-model="termAndCond" ng-change="isDisabled=!isDisabled" /><label>Yes</label> <input type="radio" value=false name="bool" ng-model="termAndCond" ng-change="isDisabled=!isDisabled" /><label>No</label> </div> <div> <input type="submit" value="Login" ng-disabled="isHide "> <input type="submit" value="Register" ng-show="isHide" ng-disabled="!isDisabled"> </div> </div> </body> </html>
Output