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.
ng-disabled