I want to set values of checked radiobutton in a variable. But I am unable to get it. Below is the code what I tried
master.controller('FiberLead_Filter', function($scope, $http, NEIQC_Service, Scopes, $rootScope) {
var rdSelectMP = $scope.MPSelect; // here I am getting undefined
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.25/angular.min.js"></script>
<div class="rightFilter" ng-controller="FiberLead_Filter as Filter" id="FiberLead_Filter">
<div class="pdfDownload customeRadioWrap">
<div class="customeRadio">
<input type="radio" id="btnCurrentMP" name="radio-group" ng-model="MPSelect" ng-value="Current">
<label for="btnCurrentMP">Current MP</label>
</div>
<div class="customeRadio">
<input type="radio" id="btnAllMP" name="radio-group" ng-model="MPSelect" ng-value="All">
<label for="btnAllMP">All MP</label>
</div>
<button class="btn btn-default customBtn" ng-click="DownloadExcelReport()"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> Download</button>
</div>
</div>
Let me know what is wrong with my code as I am getting it UNDEFINED