Reputation: 3317
Hi I have following table in ng-repeat
<div ng-repeat ="item in items">
<span>{{item.name}}></span>
<span>{{item.age}}></span>
</div>
what I want to do is Each row with mouse over is highlighted and clickable to passing the item to further process.
Please let me know how i can achieve this
Upvotes: 1
Views: 2769
Reputation: 6615
CSS
.hoverme:hover
{
background-color:yellow;
}
.clicked
{
background-color:green;
}
JS
<div class="hoverme" ng-repeat ="item in items" ng-click="doSomething(item)" ng-class="{clicked:rowClicked==item}">
<span>{{item.name}}></span>
<span>{{item.age}}></span>
</div>
Update
Example plunker
Upvotes: 5