How to enable or disable a button based on a value in angularjs? -
how enable or disable button according select value? want button disabled once select value changed vaue "xxxx" button enabled.
use ng-disabled
directive this:
<div class="form-group"> <label class="control-label"> etat</label> <select class="form-control" name="singleselect" ng-model="demande.etat"> <option value="etude">etude</option> <option value="accepte">accepte</option> <option value="refus">refus</option> </select><br> </div>
and in button markup use this:
<button ng-disabled="demande.etat != 'accepte'"> .... </button>
Comments
Post a Comment