AngularJS Built-in directives ngDisabled


This directive is useful to limit input events based on certain existing conditions.

The ng-disabled directive accepts and expression that should evaluate to either a truthy or a falsy values.

ng-disabled is used to conditionally apply the disabled attribute on an input element.


<input type="text" ng-model="">

<button ng-disabled="" ng-click="vm.submitMe">Submit</button> is evaluated to true if the input's length is 0, which is turn disables the button, disallowing the user to fire the click event of ng-click