How to get value of selected radio button in angularjs

后端 未结 6 724
一整个雨季
一整个雨季 2020-12-31 13:23

I have two radio buttons pass and fail.

How to get value of selected radio button.

6条回答
  •  误落风尘
    2020-12-31 13:55

    angular.module('resultApp', []).controller('resultCtrl', function($scope) {
     
      $scope.result = 'pass';
      
      $scope.submitResult = function(result) {
        
        alert(result)
      };
    });
    
      
      
    
      
      
    Result
    {{result}}

提交回复
热议问题