title: how to get object value on button click in angular?
body: <p>I am displaying a list view in angular using ng-repeat .I an able to display list .Actually there is one radio button in each row .And I have one button on screen .I want to get object of selected radio button on button click .In other words If I select first row radio button then if I click button I need get it object how I will achieve this ?</p>
  
  <p>here is my code</p>
  
  <pre><code>&lt;table&gt;
  
      &lt;tr id="$index"ng-repeat= "a in data " ng-click="getselectedRow(a)"&gt;
          &lt;td&gt; {{a.condidateID}} &lt;/td&gt;
          &lt;td&gt; {{a.condidateName}} &lt;/td&gt;
          &lt;td&gt; {{a.territory}} &lt;/td&gt;
          &lt;td&gt; {{a.voteCount}} &lt;/td&gt;
          &lt;td&gt;  &lt;input type="radio" name="chickenEgg" value="egg" ng-model="chekratiovalue"&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
  &lt;/table&gt;
          &lt;button style="left: 40%;top: 40%;float: left;position: relative" ng-click="voteForPerson()"&gt;Vote&lt;/button&gt;
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <pre><code> function userdetail($scope,$http,$location,$routeParams){
          console.log(JSON.parse($routeParams.userDetail));
          var userDetail=JSON.parse($routeParams.userDetail);
          $scope.data=userDetail.data;
          console.log($scope.data);
          console.log($scope.data);
          $scope.changeEvnt = function(index) {
              $scope.activeRow = index;
              alert( $scope.activeRow);
          }
  
          $scope.voteForPerson = function() {
              var selcted = $scope.data[activeRow ];
          }
      }
  
  
  &lt;table&gt;
  
      &lt;tr id="$index"ng-repeat= "a in data " ng-click="getselectedRow(a)"&gt;
          &lt;td&gt; {{a.condidateID}} &lt;/td&gt;
          &lt;td&gt; {{a.condidateName}} &lt;/td&gt;
          &lt;td&gt; {{a.territory}} &lt;/td&gt;
          &lt;td&gt; {{a.voteCount}} &lt;/td&gt;
          &lt;td&gt;  &lt;input type="radio" name="chickenEgg" value="egg" ng-model="chekratiovalue" ng-change="changeEvnt($index)"&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
  &lt;/table&gt;
          &lt;button style="left: 40%;top: 40%;float: left;position: relative" ng-click="voteForPerson()"&gt;Vote&lt;/button&gt;
  </code></pre>