How to write the directive to highlight the selected row in a table,
I have 20 plus tables and i need to write a common function for this table.
I am writing the same code in controllers,
$scope.selectedRow = null;
$scope.rowHighilited = function(row){
$scope.selectedRow = row;
};
<table>
<tr>
<th>
first row
</th>
</tr>
<tr data-ng-click="rowHighilited($index)">row1</tr>
</table>