DEV Community

Rahul Raveendran
Rahul Raveendran

Posted on • Updated on

Angular Mouse Events

Angular has a total of 9 mouse events.

1. Click

click-gif

The click event occurs when the user clicks on the element to which it is applied. This event triggers the function that is attached to the click.

2. dblclick

hover-gif

The dblclick event is triggered when the user double-clicks on the element to which it is applied.

3. Mouseover

hover-gif

The mouseover event is triggered when the cursor is over the element to which it is applied, similar to the hover effect.

4. Mouseenter

hover-gif

The mouseenter event is triggered when the mouse pointer is moved onto the element to which it is applied..

5. Mouseleave

hover-gif

The mouseleave event is triggered when the mouse pointer leaves the element to which it is applied.

6. Mousedown

hover-gif

The mousedown event is triggered when the user presses the mouse button over the element to which it is applied..

7. Mouseup

hover-gif

The mouseup event is triggered when the user releases the mouse button over the element to which it is applied..

8. Drag

hover-gif

The drag event is triggered when the user starts dragging the element to which it is applied..

8. Dragover

hover-gif

Triggers every time an item is dragged over dragover applied element.

Top comments (3)

Collapse
 
canbax profile image
yusuf

what about the event arguments such as location of click etc ...

Collapse
 
orahul1 profile image
Rahul Raveendran

you can pass "$event" from click to get those information eg: (click)="onClick($event)"

Collapse
 
bwfrieds profile image
Ben Friedman

mouseout?