In my template, I display a series of "icons".
<div ng-repeat="data in items | orderBy:'-timestamp'">
<div class="icon">
<i>1</i>
<span>2</span>
</div>
</div>
To hide i
and show span
when hovering over .icon
, I use the following CSS:
.icon:hover i { display: none; }
.icon:hover span { display: block; }
Additionally, I want to display all instances of span
when $scope.options == true
. To achieve this, I included the following:
<i ng-hide="options">1</i>
<span ng-show="options">2</span>
However, this caused the :hover
effect to stop working properly.
Is there a way to override the ng-show
directive so that the CSS still applies when hovering?