If I have the following code snippet:
<div
class="italic"
ng-class="{red: hover}"
ng-mouseenter="hover = true"
ng-mouseleave="hover = false">
Test 1 2 3.
</div>
<div
class="italic"
ng-class="{red: hover}"
ng-mouseenter="hover = true"
ng-mouseleave="hover = false">
Test 1 2 3.
</div>
I am trying to change the color to red when a user hovers over the div. However, currently both divs turn red when hovered over.
[Fiddle]1 for experimenting with the code