Reputation: 251
I have a problem, how to execute ng-mouseenter
or ng-mousehover
just once
http://plnkr.co/edit/CIdFhCJR8SOatjoDgd8m?p=preview
How to keep that "1" on count?
Upvotes: 1
Views: 227
Reputation: 21901
use like this
<button ng-mouseover="(count == 0) ? count = count + 1 : return" ng-init="count=0">
IF count == 0
then execute the count = count + 1
ELSE just return
.
Upvotes: 4