0
votes

I want to reset radio buttons in AngularJS.

I have a set of three radio buttons that display different information depending on the radio selection and I set a default value so when my app loads it will always display the first radio.

        function topRadios() {

        $scope.topTable = "topCategory";

    }

And in my view I have a div where I call that fuction inside an ng-init

 <div>ng-init="topRadios()"</div>

I have a button that when I click it, sends a request to get different data depending on some filters that button calls a function that does that request.

<button class="goButton btn btn-xs" ng-click="go()"  ng-disabled="isClicked"> Apply </button>

What I want to do is that if Im whatching the info of the second radio button or the third one and then click on the Apply button to see different data the radio button selection resets.

1

1 Answers

0
votes
Here an example to reset radio button 

Fiddle