AngularJS ng-mousemove지시문


예시

마우스 커서가 <div> 요소 위로 이동할 때 표현식을 실행합니다.

<div ng-mousemove="count = count + 1" ng-init="count=0">Mouse over me!</div>

<h1>{{count}}</h1>

정의 및 사용

ng-mousemove지시문은 AngularJS에 마우스 커서가 특정 HTML 요소 위로 이동할 때 수행할 작업을 알려줍니다 .

AngularJS 의 ng-mousemove지시문은 요소의 원래 onmousemove 이벤트를 재정의하지 않고 둘 다 실행됩니다.


통사론

<element ng-mousemove="expression"></element>

모든 HTML 요소에서 지원됩니다.


매개변수 값

Value Description
expression An expression to execute when the mouse cursor moves over an element.