Reputation: 3307
Hi I have following dropdown
<select ng-model="item" ng-options="a.name for a in adda" ng-change="onChange()">
<option value="">
Add new account
</option>
</select>
In my code I have following button..
<button class="btnS btn-success ctrl-btn" ng-click="save()"> Submit</button>
What i want the button disabled and only be enabled if one of the options in the drop down is selected. Thanks
Upvotes: 1
Views: 5179
Reputation: 47933
You can use ng-disabled
:
<button
class="btnS btn-success ctrl-btn"
ng-click="save()"
ng-disabled="!item"> Submit</button>
Upvotes: 5