angular-light icon indicating copy to clipboard operation
angular-light copied to clipboard

events mousehover, mouseactive

Open lega911 opened this issue 8 years ago • 1 comments

hover and active are both one-way bindings - they are events, so probably we can itegrate them to @events, we can add modifier "model" to declare that we use model instead of js expression.

@mousehover.model="model"
@mouseactive.model="model"

for "hover" we can use "mouseenter + mouseleave"

@mousehover.model="model"
==
@mouseenter="model=true" @mouseleave="model=false"
for "active": mousedown + mouseup + mouseleave

https://jsfiddle.net/lega911/x4ggb2ct/

lega911 avatar Feb 28 '16 09:02 lega911

In this case maybe another directive would be great (especially für mobile applications): al-isvisible

When the visibility state of an element gets changed, it should toggle a boolean model variable. I think it will be hard to implement, because there are no events which can be watched.

dev-rke avatar Mar 11 '16 07:03 dev-rke