VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/angularjs-ng-mouseover-directive/

⇱ AngularJS ng-mouseover Directive - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AngularJS ng-mouseover Directive

Last Updated : 8 Sep, 2022

The ng-mouseover Directive in AngularJS is used to apply custom behavior when a mouseover event occurs on a specific HTML element. It can be used to show a popup alert when the mouse moves over a specific element. It is supported by all HTML elements. 

 

Syntax:

<element ng-mouseover="expression">
 Content... 
</element>

Parameter value:

  • expression: This expression specifies that when the mouse cursor moves over the element then the associated expression will be executed.

Example 1: This example uses the ng-mouseover Directive to display content when the mouse moves over the element. 

Output:

👁 Image
 

Example 2: This example uses the ng-mouseover Directive to display an alert message when the mouse moves over an element. 

Output: 

👁 Image
 
Comment

Explore