Angular js bootstrap button disable
I have the following angularjs app html file:
I would like to know if we can disable the Add course button whenever the condition required credits == completed credits is met. The controller is a regular json file with all the parameters in the subcategories.
Use the ng-disabled directive
<button class="btn btn-default pull-right" ng-disabled="subcategory.required2 == subcategory.completed2" ng-click="open(subcategory)">Add Course <span class="glyphicon glyphicon-plus"></span></button>
Just set the isDisabled variable in the controller based on the condition.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News