Closed tandvu closed 7 years ago
@tandvu ,
Unfortunately there's no such mouseover callback. You'll need to modify the directive yourself.
I'm not good with directive but I would like to give it a try. Would you be able to point me to where I should start?
Thank you so much.
Tom
@tandvu ,
It's just a matter of passing your callback into the directive and then call it during mouseover. For example, you can learn from the directive's on-close
callback.
Pass the callback function into the directive
Find this in the top of the directive code: onClose: '&',
. So for mouseover, you just add something like.. onMouseover: '&'
there.
Call it during mouseover
There are few ways to do it; one is to modify the template by adding ng-mouseover, or have a event listener in the link
function. Both should work.
I highly suggest you to read a bit on AngularJS directive.
Is there a support for a MouseOver (Hover) an item event? At the moment, when I move the mouse over an item, it got highlighted. I would like to write a function when the item got highlighted.
Thank you.
Tom