title: highlight table row using angularjs
body: <p>how to highlight a table row using angularjs. i tried in the following way but it is highlighting all rows.</p>
  
  <p>I have a table in the following way,</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
  &lt;th&gt;header1&lt;/th&gt;
  &lt;th&gt;header2&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tbody data-ng-repeat="transaction in transactionsgroup"&gt;
    &lt;tr data-ng-click="rowHighilited($index)" data-ng-repeat="txns in transaction.transactions" data-ng-class='{selected: $index==selectedRow}'&gt;
  &lt;td&gt;xxxxxx&lt;/td&gt;
  &lt;td&gt;xxxxxx&lt;/td&gt;
  
  &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>controller,</p>
  
  <pre><code>$scope.rowHighilited = function(row){
        $scope.selectedRow = row; 
    };
  </code></pre>