Sitemap

Mouse Events — Angular

3 min readDec 26, 2022

--

Hello awesome people, Hope you are doing great. In this story, we are going to cover different types of mouse events present in angular.

Press enter or click to view image in full size
Mouse Events
  • Click event occurs when the user clicks the click applied element. click event triggers the function attached to the click.

Note: The difference between click and onclick is that click is an event listener where as the onclick is an event handler content attribute.

Press enter or click to view image in full size
click
  • When the user double-click the dblclick event triggers on the applied element.
Press enter or click to view image in full size
dblclick
  • Triggers mouseover, when the cursor is over the applied element (like hover).
Press enter or click to view image in full size
mouseover
  • Triggers mouseenter, when the mouse pointer is moved onto the applied element.
Press enter or click to view image in full size
mouseenter
  • Triggers mouseleave, when the mouse pointer leaves the applied element.
Press enter or click to view image in full size
mouseleave
  • Triggers mousedown, when the user presses the mouse button over the applied element.
Press enter or click to view image in full size
mousedown
  • Triggers mouseup, when the user releases the mouse button over the applied element.
Press enter or click to view image in full size
mouseup
  • Triggers dragover event, When the user drags on the applied element.
Press enter or click to view image in full size
dragover
  • Triggers every time when an item is dragged over drag applied element.
Press enter or click to view image in full size
drag

Conclusion

We explored different types of interaction with respect to mouse events. Hope you extracted some knowledge from it. In case of any doubt or if you just want to say Hi! feel free to reach me on LinkedIn or GitHub.

If you like the blog make sure to take a look at my YouTube channel for more amazing stuff.

--

--