title: Highlight selected row in ng-repeat with logic only in HTML
body: <p>This is a follow up question of <a href="https://stackoverflow.com/questions/19331779/how-to-highlight-a-selected-row-in-ngrepeat">How to highlight a selected row in ngRepeat?</a></p>
  
  <p>Here the row is being highlighted using a function defined in controller.I wanted to make the other way round,where I want to use only the code in HTML.
  Below is my plunker that I have tried .
  <a href="http://plnkr.co/edit/4ZFKPokPN2TIc1bN6kzt?p=preview" rel="nofollow noreferrer">Plunker</a>
  Pls share your thoughts on this issue:</p>
  
  <pre><code>&lt;tr ng-repeat="item in items" 
           ng-init="selectedRow = null"
            ng-class="{'selected':selectedRow == $index}" 
            ng-click="selectedRow=$index" &gt;&lt;/tr&gt;
  </code></pre>