angular-light
angular-light copied to clipboard
events mousehover, mouseactive
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/
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.