In this example of ng-disabled directive we have a textbox of email type and if you type invalid email in this textbox the submit button will disable and gets enable when you type valid email in the textbox.

<!DOCTYPE html> <html xmlns=""> <head> <title></title> <script src=""></script> </head> <body ng-app> <div ng-init="name='[email protected]'"> <form name="myForm"> <label>Email</label> <input type="email" name="name" ng-model=""> <input type="submit" ng-disabled="!$valid"> </form> </div> </body> </html>