Looking to refresh radio button selection in AngularJS.
I have a group of three radio buttons that reveal different content based on the selected option, with a default value set to display the first radio button upon loading the app.
function resetRadioSelection() {
$scope.selectedRadio = "default";
}
In my view, I call this function inside an ng-init directive within a div.
<div>ng-init="resetRadioSelection()"</div>
There's also a button that triggers a request for new data based on certain filters. Clicking this button calls a function to handle the request.
<button class="goButton btn btn-xs" ng-click="applyChanges()" ng-disabled="isClicked"> Apply </button>
The goal is to ensure that when clicking the Apply button to view updated information, any previously selected radio button reverts back to the default state.