I have a basic html table where i need to have all the rows initially highlighted when the table is created. Also, if the user clicks the row it un highlights and clicked again highlights.

I have the click on a row, and it highlights. If you click again it un highlights.
I just need to initially highlight all rows possibly by ng-repeat. It also needs to release the highlighting when the row is clicked again and then highlight back. userData is just a line of text for each row

**HTML**

```
<table class="superusertable" cellpadding="5" cellspacing="0">
  <tbody class="table-font">
  <tr ng-init="" ng-repeat="source in userData" 
                 ng-model="source.fromSourceID" 
                 ng-class="{'sourcesSelected': source.sourcesSelected}" 
                 ng-click="select(source)">
  <td width="290px">
 <div class="action-checkbox"; width="290px">{{source.fromSourceID}}
</div>
</td>
</tr>
</tbody>
</table>

```

**angular**

```
 $scope.select = function(item) {
    item.sourcesSelected ? item.sourcesSelected = false : item.sourcesSelected = true;
};

```