How to get value of selected radio button in angularjs

后端 未结 6 711
一整个雨季
一整个雨季 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 14:05

    Inside of Directive and ng-repeat above solutions will not work

    Here is the best way to get selected value inside directive :

    Template : '{{item.ActivityHeaderId}}' 
    
    controller: function ($scope) {
                $scope.RadioChange = function (s) {
                    $scope.SelectedExistingReportData = s;
                };
    
                $scope.setWeldDataToGrid = function () {
                    alert($scope.SelectedExistingReportData);
                    //  $('.modal').modal('hide');
                }
    
            }
    
    
    
    ''
    

提交回复
热议问题