In this article, we will see how to set checkbox checked on the click of a button in AngularJS.
Approach: The approach is to use the ng-checked to check the checkbox in the DOM. In the first example, a single checkbox is checked by the button and In the second example, multiple checkbox are checked by button. ng-model is used to bind the checkboxes.
- How to set radio button checked by button click in AngularJS ?
- Alternative of ng-checked to get the checkbox's state in AngularJS
- How to add input fields dynamically on button click in AngularJS ?
- How to read if a checkbox is checked in PHP?
- HTML | DOM Input Checkbox checked Property
- How to check whether a checkbox is checked in jQuery?
- AngularJS | ng-checked Directive
- AngularJS | ng-click Directive
- What is the use of a double-click event in AngularJs?
- How to directly update a field by using ng-click in AngularJS ?
- Radio Button Vs Checkbox in HTML
- How to call PHP function on the click of a Button ?
- How to load notification alert on top right corner without click of button in bootstrap ?
- How to create button dynamically with click event in Angular ?
- How to add a pressed effect on button click in CSS?
- How to click a button on webpage using selenium ?
- How to create a Ripple Effect on Click the Button ?
- How to make sure clients have enough words in textarea by using angularjs in order to disable/enable a button?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.