In this article, we will see how to get the radio button’s value with the help of AngularJS. In this article, we will use the ng-model to get the value of the checked radio button.
Example 1: In this example, the selected value is shown with an alert.
- Before clicking on the button:
- After clicking on the button:
Example 2: In this example, the selected value is shown in a <p> tag.
- How to set radio button checked by button click in AngularJS ?
- How to create a radio button similar to toggle button using Bootstrap ?
- How to know which radio button is selected using jQuery?
- How to Create Custom Radio Button using HTML and CSS ?
- How to get form input value using AngularJS ?
- Radio Button Vs Checkbox in HTML
- How to check a radio button with jQuery?
- How to make sure clients have enough words in textarea by using angularjs in order to disable/enable a button?
- How to change the button color after clicking it using AngularJS ?
- How to add input fields dynamically on button click in AngularJS ?
- How to set checkbox checked on button click in AngularJS ?
- button tag vs input type="button" attribute
- How to dynamically get the content width of a div using AngularJS ?
- How to dynamically get the content height of a div using AngularJS ?
- How to get the dimensions of the Viewport using AngularJS ?
- How to get the current URL using AngularJS ?
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.